Application.Title:='My Application'; inserted before Application:=TMyApplication.Create(nil); causing SIGSEGV.
Original Reporter info from Mantis: Theo van Oosten
-
Reporter name: Theo van Oosten
Original Reporter info from Mantis: Theo van Oosten
- Reporter name: Theo van Oosten
Description:
When Lazarus inserts the line "Application.Title:='My Application';" at another moment then the creation of a new project, it does this as the first line.
Because this is before the initialization by calling TMyApplication.Create, Application will be nill and the programm crashes with a SIGSEGV fault.
Steps to reproduce:
Create a new project, select 'console application' and accept the defaults.
Uncomment the line "Application.Title:='My Application';" using Cntrl-/ or remove the line completely.
Select 'Project options' from the 'Project' menu and close again by pressing OK (not CANCEL or the cross at the top of the window, then nothing happens).
Because "Main unit has Application.Title statement" is checked, Lazarus will add that statement to the code. Unfortunately at the wrong line.
Additional information:
This happened to me before, many versions of Lazarus back in time. At that time I could not reproduce what happened, so I thought it was a single incident.
Now I see this problem has been there since ??? At least the problem is not related to version 1.8.2