GDB Debugger with ZEOS components - exception 'External: SIGSEGV' lazarus / 12-Debugger ---------------------------------------------------------------------- tudi_x · 2014-10-31 00:57 Hi, I am trying to debug a class (excerpt below) where I am connecting to an Oracle database with ZEOS DB components. Please advise on some example that worked for you and what would be the settings for the GDB debugger successfully running inside code using ZEOS components. The application runs with no exception if not in debugging mode. Thank you Code: [Select]unit run_task; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, sql_utils, ZConnection, ZDataset, fpspreadsheet; type   Task = class   private     {DB Objects}     ZConnOracle  : TZConnection;     ZQryOracle  : TZQuery;     {Utils}     function SpecialChrFix(const S : string; OldPattern : array of string; NewPattern : string): string;   public     function  connectOracle(AUser, APassword, ADatabase : string): boolean;     procedure runSQL(AQuery : string);     procedure SpoolResults(AQueryName, AQueryDescription, ATaskID, TheFolder: string);     function  disconnectOracle(): boolean;   end;  const    OUTPUT_FORMAT  =  sfExcel8; implementation  function  Task.connectOracle(AUser, APassword, ADatabase : string): boolean;  begin    ZConnOracle          := TZConnection.Create(nil);    ZConnOracle.Protocol := 'oracle';    ZConnOracle.ReadOnly := true;    ZConnOracle.User     := AUser;    ZConnOracle.Password := APassword;    ZConnOracle.Database := ADatabase;    try     ZConnOracle.Connect;    finally      Result := ZConnOracle.Connected;    end;  end;  function  Task.disconnectOracle(): boolean;  begin    try     ZQryOracle.Close;     ZQryOracle.FreeInstance;     ZConnOracle.Disconnect;    finally      Result := not ZConnOracle.Connected;      ZConnOracle.FreeInstance;    end;  end;  procedure Task.runSQL(AQuery : string);   begin     ZQryOracle := TZQuery.Create(nil);     ZQryOracle.Connection := ZConnOracle;     ZQryOracle.ReadOnly:= true;     ZQryOracle.SQL.Text:= AQuery;     ZQryOracle.Open;   end;                                  (Lazarus 1.2.6 32 bit, Windows 7 64 bit, ZEOS 7.1, GDB 7.6.1) ---------------------------------------------------------------------- tudi_x · 2014-11-02 02:46 As last update I have moved from the main (form) unit all the remaining database (direct) calls and the ZEOS units to other units. Also doing a CleanupInstance on the release of ZEOS objects. The debugging now works (on dwarf with sets option), maybe the above helped.