fAbout.Show from Main OnCreate event cause SIGSEGV lazarus / 31-LCL ---------------------------------------------------------------------- IPguy · 2011-04-05 02:19 I created a main form - fMain, then added a second form - fAbout. When I add fAbout.Show to fMain's OnCreate event (see the below program snippet), the below message occurs at runtime. (it compiles just fine):  Project WinPopTest.exe raised exception class 'External: SIGSEGV'; The debugger points to "Visible := True; in procedure tCustomerForm.show inside customform.inc. Changing the form's .Visible property from false to true makes no difference. When I remove the show command from the OnCreate event and use a button on fMain to display the fAbout, the form display correctly. Code: [Select]procedure TfMain.FormCreate(Sender: TObject); begin   fAbout.Show; end;                  Should I be able to open a window from within the OnCreate event of fMain? Or is there another process I should use to get the about window open before the user can do any work?  0.9.31-30142-2.4.2,win32-Vista ---------------------------------------------------------------------- typo · 2011-04-05 02:26 During the creation of the first form, the second one is not created yet, see project file. You could edit project file in order to show the second form first. ---------------------------------------------------------------------- IPguy · 2011-04-05 02:36 I've tried that in my problem application and just tried that in this test app. Yes, it works, but ... After clicking on the fAbout exit button (which does a Hide) and then closing the Main application, no forms are shown, but the debugger is still running.  Something is not getting shut down. If I run the executable outside Laz, after I've closed the application, Windows Task Manger shows there is still a running "WinPopTest.exe" process running, which I have to kill.  It does not show up in the Application list.  I suspect an orphaned process somewhere. Any suggestions? ---------------------------------------------------------------------- typo · 2011-04-05 02:51 Yes. The first created form is the main, which means that, when you close it, the app is terminated. The same does not occurs with other forms. So, you need to add Application.Terminate on the OnClose event of fMain. Alternatively, you could maintain project file and add Code: [Select]Hide; fAbout.Show; on the OnShow event of the fMain. ---------------------------------------------------------------------- IPguy · 2011-04-05 03:08 typo, I've verified that the Application.Terminate works. I'll try the OnShow event tomorrow evening.  Thanks! ---------------------------------------------------------------------- IPguy · 2011-04-09 00:18 The code snippet is not perfect. If, within the main.Show event, - I do a Hide (which hides the main window), - then show the fAbout window. At some point, I need to show the main window, which triggers the main.Show event, which hides the main window, etc.... ---------------------------------------------------------------------- typo · 2011-04-09 00:48 QuoteThe code snippet is not perfect. Nothing is perfect. ---------------------------------------------------------------------- IPguy · 2011-04-09 01:35 Typo, As a fix for my challenge, I'm going to change the secondary window to a TPanel on the main form, then based on the license state, show or hide the "this is an evaluation version of the program" when the main form is shown. While not perfect, it should work and let me continue development. ---------------------------------------------------------------------- tinchs · 2012-07-24 14:47 Quote from: typo on April 05, 2011, 04:26:21 amYou could edit project file in order to show the second form first. Could you tell me how to do that? Thanks! ---------------------------------------------------------------------- KpjComp · 2012-07-24 14:55 Your initial question was about creating an about form that appears when your main form is shown. An easy way to do this is create the form yourself. So the first thing you do is remove the fAbout form from you auto- Create forms  (Project Options / Forms). And then on your FormCreate you can then do this -> Code: [Select]procedure TfMain.FormCreate(Sender: TObject); begin   if not assigned(fAbout) then fAbout := TfAbout.Create(nil);   fAbout.Show; end;