...raised exception class external SIGSEGV ?? lazarus / 16-Databases ---------------------------------------------------------------------- Elmug · 2012-06-29 01:36 SQLite3, one table, Grid application. On a  self-learning application, I get to load the grid, edit, and add records. I can change the editable "select" clause to change the target table fine, but only if I have not inserted records on the first table opened. When I insert a record, I commit and refresh. Then after two records or so inserted as said, I edit the query so it calls for another table in the database, and then get the error: ...raised exception class external SIGSEGV Any suggestions on why this would be happening? Thanks for any help afforded. PS. The above is when running in the Lazarus environment. When running the compiled .exe, the result is a Windows7 message: Form1 is not responding. ---------------------------------------------------------------------- paweld · 2012-06-29 09:53 some source code? ---------------------------------------------------------------------- Kazmirus · 2012-11-26 21:34 I have the same problem but the exception came when I try to create the form. First time I create the form Listatowarow is OK, secand time is also OK but every next call to create cause the exception External SIGSEGV at address 4101E6 and popup assembler debug window. I do not know the assembler and cant catch the error by GDB. ...     if JDBGridControl1.SelectedColumn.Index=0 then      begin          {Kartoteka}           Listatowarow:=TListatowarow.create(Nil);   <-- External SIGSEGV           Listatowarow.showmodal;           if Listatowarow.modalresult>0 then              begin ... This is source of the form Listatowarow procedure TListatowarow.FormCreate(Sender: TObject); var i:integer=0; begin   {********************************************}   {****************** CREATE ******************}   {********************************************}   Dm.Magazyny.Open;   Dm.Magazyny.First;   DBLookupComboBox1.KeyValue:=Dm.MagazynyUID_MAGAZYNU.asinteger;   Dm.Wykazkartotek.close;   Dm.Wykazkartotek.SQL.Clear;   Dm.Wykazkartotek.Sql.Add('select A.*, P.*, V.*, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 1 FOR 1) NETTO, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 2 FOR 1) VAT, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 3 FOR 1) BRUTTO  ');   Dm.Wykazkartotek.Sql.Add(' from ');   Dm.Wykazkartotek.Sql.Add(' KARTA_MAG A ');   Dm.Wykazkartotek.Sql.Add(' LEFT OUTER JOIN PKWIU P ON (A.UID_PKWIU=P.UID_PKWIU) ');   Dm.Wykazkartotek.Sql.Add(' LEFT OUTER JOIN STAWKI_VAT V ON (V.UID_STAWKIVAT=A.UID_STAWKIVAT) ');   Dm.Wykazkartotek.Sql.Add('WHERE ');   Dm.Wykazkartotek.Sql.Add('A.NAZWA_TOWARU LIKE ''%%''  ');   Dm.Wykazkartotek.Sql.Add('AND UID_MAGAZYNU='+vartostr(Dm.MagazynyUID_MAGAZYNU.asinteger));   Dm.Wykazkartotek.Sql.Add('ORDER BY A.NAZWA_TOWARU ');   Dm.Wykazkartotek.open;   while i<3 do   begin     ComboBox1.Items.Add(Dbgrid1.Columns.Items.Title.Caption);     inc(i);   end;   Combobox1.ItemIndex:=0; end; ---------------------------------------------------------------------- Kazmirus · 2012-11-26 21:56 Quote from: Kazmirus on November 26, 2012, 10:34:00 pmI have the same problem but the exception came when I try to create the form. First time I create the form Listatowarow is OK, secand time is also OK but every next call to create cause the exception External SIGSEGV at address 4101E6 and popup assembler debug window. I do not know the assembler and cant catch the error by GDB. ...     if JDBGridControl1.SelectedColumn.Index=0 then      begin          {Kartoteka}           Listatowarow:=TListatowarow.create(Nil);   <-- External SIGSEGV           Listatowarow.showmodal;           if Listatowarow.modalresult>0 then              begin ... This is source of the form Listatowarow procedure TListatowarow.FormCreate(Sender: TObject); var i:integer=0; begin   {********************************************}   {****************** CREATE ******************}   {********************************************}   Dm.Magazyny.Open;   Dm.Magazyny.First;   DBLookupComboBox1.KeyValue:=Dm.MagazynyUID_MAGAZYNU.asinteger;   Dm.Wykazkartotek.close;   Dm.Wykazkartotek.SQL.Clear;   Dm.Wykazkartotek.Sql.Add('select A.*, P.*, V.*, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 1 FOR 1) NETTO, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 2 FOR 1) VAT, ');   Dm.Wykazkartotek.Sql.Add('SUBSTRING(A.RODZAJ_CENY FROM 3 FOR 1) BRUTTO  ');   Dm.Wykazkartotek.Sql.Add(' from ');   Dm.Wykazkartotek.Sql.Add(' KARTA_MAG A ');   Dm.Wykazkartotek.Sql.Add(' LEFT OUTER JOIN PKWIU P ON (A.UID_PKWIU=P.UID_PKWIU) ');   Dm.Wykazkartotek.Sql.Add(' LEFT OUTER JOIN STAWKI_VAT V ON (V.UID_STAWKIVAT=A.UID_STAWKIVAT) ');   Dm.Wykazkartotek.Sql.Add('WHERE ');   Dm.Wykazkartotek.Sql.Add('A.NAZWA_TOWARU LIKE ''%%''  ');   Dm.Wykazkartotek.Sql.Add('AND UID_MAGAZYNU='+vartostr(Dm.MagazynyUID_MAGAZYNU.asinteger));   Dm.Wykazkartotek.Sql.Add('ORDER BY A.NAZWA_TOWARU ');   Dm.Wykazkartotek.open;   while i<3 do   begin     ComboBox1.Items.Add(Dbgrid1.Columns.Items.Title.Caption);     inc(i);   end;   Combobox1.ItemIndex:=0; end; The error I find in module LCL. class function TLCLComponent.NewInstance: TObject; begin   Result := inherited NewInstance;   <--- Right here External SIGSEGV   WSRegisterClass;   TLCLComponent(Result).FWidgetSetClass := GetWSComponentClass(TLCLComponent(Result)); end; ---------------------------------------------------------------------- User137 · 2012-11-26 22:02 Is Listatowarow ever freed? Also can you debug TListatowarow.FormCreate() line by line to see where it stops? Could be some property from some visual component that can't be accessed in formCreate (because they aren't showing yet). edit: Use CODE tags. You can also edit your post, don't need to quote it again. ---------------------------------------------------------------------- BlueIcaro · 2012-11-26 22:02 Try to change this line: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     Listatowarow:=TListatowarow.create(Nil);  for this one: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     Listatowarow:=TListatowarow.create(Self);  or this one: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     Listatowarow:=TListatowarow.create(Application); /BlueIcaro ---------------------------------------------------------------------- Kazmirus · 2012-11-26 22:30 After debug it line by line.. The error I find in module LCL. class function TLCLComponent.NewInstance: TObject; begin   Result := inherited NewInstance;   <--- Right here External SIGSEGV   WSRegisterClass;   TLCLComponent(Result).FWidgetSetClass := GetWSComponentClass(TLCLComponent(Result)); end;  I tryed to use create(self), create(application) - the same error. ---------------------------------------------------------------------- Kazmirus · 2012-11-26 22:40 Yes the form Listatowarow is freed. Sorry that you have to wait for my answer but the forum database is so slow and additional I'm new here and I do not know all options how to replay. ---------------------------------------------------------------------- paweld · 2012-11-27 12:14 On form ListaTowarow move code from event FormCreate to FormShow. Pozdrawiam