Main Form will not call a new form with ShowModal lazarus / 9-Editor ---------------------------------------------------------------------- CarmichaelJohn · 2020-07-13 23:00 Hello, If I am in the wrong forum to ask this please excuse me. I am having difficulty in getting the main unit/form in my program to call another form using ShowModal. I have placed the new form’s name in the uses clause of the main form.  Yet the program will successfully execute and the main form shows up.  Then when I click on the menu item for the new form I get an error message: “Project project (my project’s name) raised exception class ‘External:SVGSEGV’.  The called form is called ‘Form9', and the call statement looks as follows: “procedure TForm1.MenuItem11Click(Sender: TObject); begin   //   Form9.ShowModal;   // end;“ I built the program several days ago and then went back to it to add this new form.  Is there a formal “Add to Program” or “Add to Project” that I am missing, or is there something else that I must do to have the main form recognize Form9. Thank you in advance for any help you might provide, John ---------------------------------------------------------------------- RAW · 2020-07-13 23:25 Try this: 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 procedure TForm1.FormClick(Sender: TObject);begin  Form9:= TForm9.Create(Self);  Form9.SetBounds(0,0,Width,Height);  Form9.ShowModal;end; Or maybe better like this ...  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 procedure TForm1.FormClick(Sender: TObject);begin  Form2 := TForm2.Create(nil);  try    Form2.SetBounds(0, 0, Width, Height);    Form2.ShowModal;  finally    Form2.Release;    Form2 := nil;  end;end; ---------------------------------------------------------------------- Blaazen · 2020-07-13 23:25 @  I have placed the new form’s name in the uses clause of the main form. Actually, there must be name of the unit where the form is defined. But SIGSEGV indicates that Form9 is not created. Look at the *.lpr file of your project. There must be something like this: 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 Application.CreateForm(TForm9, Form9); Also, that form must be Visible:=False; (set it in Object Inspector). ---------------------------------------------------------------------- CarmichaelJohn · 2020-07-14 00:22 Blaazen and Raw, Thank you both so much for this information.  Now I know and will be able to avoid this problem in the future.  I very much appreciate you're taking the time and effort to help me. John