[SOLVED] Opening a second form causes an External: SIGSEGV error. lazarus / 31-LCL ---------------------------------------------------------------------- JCobb · 2018-04-01 08:34 I've tried this on two projects to far.  The project I was working on kept crashing with the error: Project project1 raised and exception class 'External: SIGSEGV'. In file 'include\customform.inc' AT LINE 2317 Then I created a new project and created two forms.  Same problem, when I do "Form2.show" it throws the same error. I'm using Windows 7 64 bit, Lazarus 1.8.2 (latest download). The only think I can think of that I changed was I did a recent Windows update.  I also installed SharpDevelop as well as the 4.5.2 .Net SDK.  I attempted to install the .Net 4.0 SDK but it failed. I also install livecode 8.1.9.   I tried to do an "update" on that IDE and it simply installed another copy of itself. I also changed my Windows user environment "path" to include the MinGW path for gcc and g++, etc. After this error kept occuring I uninstalled all the software I previously installed, removed the path then did CCleaner to clean up the registry and other junk.  No luck, the problem still occurs. I know this isn't normal because it was working prior to my installing the other IDEs.  Somehow I screwed something up, just not sure what it was. I don't know what else I could mention that might help resolve this issue but until it's fixed my Windows FPC apps will only work with one form. Jeff ---------------------------------------------------------------------- balazsszekely · 2018-04-01 08:55 Please attach a small test project(source only) so we can run a few test. ---------------------------------------------------------------------- wp · 2018-04-01 10:10 Are you sure that Form2 has been created? Go to "Project Options" > "Forms". Form2 must be in the list of auto-created forms. If it is in the other list there must be a "Form2 := TForm2.Create(..)" somewhere before you can call "Form2.Show". ---------------------------------------------------------------------- totya · 2018-04-01 10:12 Quote from: JCobb on April 01, 2018, 10:34:50 amI've tried this on two projects to far.  The project I was working on kept crashing with the error: Project project1 raised and exception class 'External: SIGSEGV'. In file 'include\customform.inc' AT LINE 2317 It seems to me you want to show the form, without the form created. Are you sure the form 2 created? For example: 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(TForm2, Form2); ---------------------------------------------------------------------- flowCRANE · 2018-04-01 14:34 If Form2 must be created manually, you need to create it, then show, and then free. 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 Form2 := TForm2.Create(Self);try  Form2.ShowModal();finally  Form2.Free();end; Your form need a better name than default. ---------------------------------------------------------------------- JCobb · 2018-04-01 19:00 "FURIOUS PROGRAMMING" is correct.  It seems when I create Form2 in Form1's create event everything works fine. I've attached the test project I made.  It works now because of the Form2.Create in the Form1.Create method. And I don't recall having to do this earlier.   I checked the AutoCreate list and Form2 is in there.  And I distinctly recall not having to MANUALLY create a form before I show it. This is weird but at least I have a work-around. Thanks much. Jeff ---------------------------------------------------------------------- wp · 2018-04-01 20:04 You cannot show Form2 while you create Form1. These are the essential lines from your lpr file: 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 begin  ...  Application.CreateForm(TForm1, Form1);  Application.CreateForm(TForm2, Form2);  Application.Run;...At first you create Form1, then you create Form2, this means that Form2 does not yet exist when you try to show it. If you want both forms to appear at program start call Form2.Show in the OnShow event of TForm1. This occurs in Application.Run when everything has been set up. Next time when you post a question please try to provide a demo in the first place. With a demo you would have received immediate help, without a demo everybody was just guessing. ---------------------------------------------------------------------- JCobb · 2018-04-01 21:01 Quote from: wp on April 01, 2018, 10:04:45 pmNext time when you post a question please try to provide a demo in the first place. With a demo you would have received immediate help, without a demo everybody was just guessing. Okay Thanks.  I'll remember to do that. Jeff ---------------------------------------------------------------------- flowCRANE · 2018-04-01 21:12 @JCobb: if your .lpr file looks like it was shown by @wp, then you can not create the form again. You have to choose - or create the Form2 automatically (what you can specify in the project settings window) and just call the Show/ShowModal method (without any Free), or do it dynamically, i.e. as I showed earlier. Never use both ways at the same time.