[Solved] Error 'External: SIGSEGV' lazarus / 12-Debugger ---------------------------------------------------------------------- sanor · 2010-01-12 16:14 Is a simple program with a connection to a database in firebird, but when I click a button with the code: frmAreas.showmodal; the form frmAreas does not appear and the program stops, and I get the error: Project maladir raised exception class 'External: SIGSEGV'. Anyone know why this error appears? and its resolution? ---------------------------------------------------------------------- theo · 2010-01-12 19:04 Did you create the form somewhere? SigSegv is a general message like "acces violation" http://en.wikipedia.org/wiki/SIGSEGV ---------------------------------------------------------------------- sanor · 2010-01-12 21:27 resolved I forgot to put: Application.CreateForm (TfrmAreas, frmAreas); in Unit.  The delphi add this line of code automatically, and Lazarus not, so I forgot. Thanks ---------------------------------------------------------------------- theo · 2010-01-12 21:32 Quote from: sanor on January 12, 2010, 10:27:38 pmThe delphi add this line of code automatically, and Lazarus not, so I forgot. No, if you add a form with "File -> New Form", lazarus adds "CreateForm" to the *.lpr too. ---------------------------------------------------------------------- sanor · 2010-01-12 22:56 My lazarus is not doing that. I have to put the "CreateForm" manually for each form. __________________ program Project1; {$mode objfpc}{$H+} uses   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}   Interfaces, // this includes the LCL widgetset   Forms, UPrincipal, UAreas, LResources   { you can add units after this }; {$IFDEF WINDOWS}{$R maladir.rc}{$ENDIF} begin   Application.Initialize;   Application.CreateForm(TfrmPrincipal, frmPrincipal);   Application.CreateForm(TfrmAreas, frmAreas);   Application.Run; end. ---------------------------------------------------------------------- Leledumbo · 2010-01-13 08:59 QuoteMy lazarus is not doing that. I have to put the "CreateForm" manually for each form. Bug? What's your version? ---------------------------------------------------------------------- sanor · 2010-01-13 09:20 Lazarus 0.9.28.2 beta FPC 2.2.4 ---------------------------------------------------------------------- dmdmaasz6 · 2011-06-18 14:35 Hello Guys im a student from namibia and im doging my end year  grade 12 project in lazarus 0.9.28.2 and I created a mySQLdatabase program but every time I use my save button wwith the following code : procedure TForm2.Button1Click(Sender: TObject); begin   Form2 := TForm2.Create(nil);   try     Form2.DataSource1.DataSet := CatQuery1;     CatQuery1.ParseSQL:=true;     CatQuery1.ReadOnly:=false;     CatQuery1.Open;   finally     CatQuery1.Upda]"]>Blockedde:=upWhereChanged;     CatQuery1.ApplyUpdates;     IMTransaction1.Commit;     Form2.Free;     CatQuery1.Close;     CatQuery1.ParseSQL:=false;     CatQuery1.ReadOnly:=true;     Form2.ShowModal;   end; end;                      It gives the error 'External: SIGSEGV' can you guys plz assist me in my problem cause ive tried and tried but the lack of entire knowledge concerning this error has left me desperate for help. Any input will be much appreciated. ---------------------------------------------------------------------- Blaazen · 2011-06-18 14:48 Code: [Select]procedure TForm2.Button1Click(Sender: TObject); begin   Form2 := TForm2.Create(nil);   try     Form2.DataSource1.DataSet := CatQuery1;     CatQuery1.ParseSQL:=true;     CatQuery1.ReadOnly:=false;     CatQuery1.Open;   finally     CatQuery1.Upda]"]>Blockedde:=upWhereChanged;     CatQuery1.ApplyUpdates;     IMTransaction1.Commit;     Form2.Free;     CatQuery1.Close;     CatQuery1.ParseSQL:=false;     CatQuery1.ReadOnly:=true;     Form2.ShowModal;   end; end;      this is very, very bad. You cannot create Form2 by click on Button which is placed on the Form2 ! You cannot do Form2.Free and few lines later do Form2.ShowModal because Form2 does not exists at that moment! I guess that all Forms in your project are autocreated. Try: Code: [Select]procedure TForm2.Button1Click(Sender: TObject); begin   //Form2 := TForm2.Create(nil);   try     Form2.DataSource1.DataSet := CatQuery1;     CatQuery1.ParseSQL:=true;     CatQuery1.ReadOnly:=false;     CatQuery1.Open;   finally     CatQuery1.Upda]"]>Blockedde:=upWhereChanged;     CatQuery1.ApplyUpdates;     IMTransaction1.Commit;     //Form2.Free;     CatQuery1.Close;     CatQuery1.ParseSQL:=false;     CatQuery1.ReadOnly:=true;     //Form2.ShowModal;   end; end;      and Form2.ShowModal must be done elsewhere - in Form1.ButtonXY click? ---------------------------------------------------------------------- talitaedwiges · 2023-01-21 14:02 SORRY BUT I DON'T KNOW HOW TO CREATE A NEW TOPIC! Estou criando uma API de raltorios no lazarus + fortes, But when I try to call my Form from the report TReportTeste.Create(nil) the system displays the SIGSEGV error. This is an API using the strong report.