The application tries to display Form3 but Form3 was not created:
program TestCallingForms_pj;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms,
TestCallingForms_Main, testcallingforms_01 , testcallingforms_02
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
//Application.CreateForm(TForm2, Form2);
//Application.CreateForm(TForm3, Form3); //<- if this is uncommented, the Sigsev doesnt occur
Application.Run;
end.
Howto find this:
Looking in Google for the access violation doesnt help.
The error message shows where the access violation occured, the file and line number.
Goto this location (while debugging) and display the Call Stack.
Look in the call stack for a procedure you wrote, see that "Form3" is accessed in this procedure.
Search for all references to Form3 and see the Form was never created.