Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-12

Strange application startup problem

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aradeonas

Hi,

Today I open one of my applications and start working on it and made many changes and hit the run but it will immediately crash! So like a programmer I add a break poit on my main form create and no it will not run and crash will happen. So I add another break point to first line of application:

begin? RequireDerivedFormResource:=True; //>>>> Here Application.Initialize;? ?Application.CreateForm(TFormX, FormX); Application.Run; end.

the lpr file is made automatically but even the first line will never run! It was strange so I delete CreateForm line and run again :

begin? RequireDerivedFormResource:=True; //>>>> Here Application.Initialize;? ?Application.Run; end.

And now everything work!

So the problem is form but what? I add a new clean form and make it main form like this :

begin? RequireDerivedFormResource:=True; Application.Initialize;? Application.CreateForm(TForm1, Form1); Application.Run; end.

And run and everything OK. So add a button on Form1 and write :

Application.CreateForm(TFormX, FormX); ??FormX.Show;

And again crash without even running the line in button or clicking it. Project is in default mode (made from lazarus and I every debug mode is on and I checked default debug mode ) and nothing, I also uncheck Win32 target platform so maybe it show any message in CMD but nothing.

This program is bug and I cant share the code or forms and I dont know what was changed this and I can go back,I just need a debug info.

So anyone has a clue on what is the problem or how find it?

I do this in a Windows 8 64bit with Lazarus 1.5 and FPC 3.1.1 .

Regards, Ara

http://www.fastmail.com - Choose from over 50 domains or use your own -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151203/db85584d/attachment-0001.html>

Reply by email

Tony Whyman
to Aradeonas

Any Initialization clauses in your form or the units it brings in?

Aradeonas wrote 59 lines
Hi, Today I open one of my applications and start working on it and made many changes and hit the run but it will immediately crash! So like a programmer I add a break poit on my main form create and no it will not run and crash will happen. So I add another break point to first line of application: begin RequireDerivedFormResource:=True; //>>>> Here Application.Initialize; Application.CreateForm(TFormX, FormX); Application.Run; end. the lpr file is made automatically but even the first line will never run! It was strange so I delete CreateForm line and run again : begin RequireDerivedFormResource:=True; //>>>> Here Application.Initialize; Application.Run; end. And now everything work! So the problem is form but what? I add a new clean form and make it main form like this : begin RequireDerivedFormResource:=True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. And run and everything OK. So add a button on Form1 and write : Application.CreateForm(TFormX, FormX); FormX.Show; And again crash without even running the line in button or clicking it. Project is in default mode (made from lazarus and I every debug mode is on and I checked default debug mode ) and nothing, I also uncheck Win32 target platform so maybe it show any message in CMD but nothing. This program is bug and I cant share the code or forms and I dont know what was changed this and I can go back,I just need a debug info. So anyone has a clue on what is the problem or how find it? I do this in a Windows 8 64bit with Lazarus 1.5 and FPC 3.1.1 . Regards, Ara -- http://www.fastmail.com - Choose from over 50 domains or use your own -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151204/8e8db8cb/attachment.html>

Reply by email

Aradeonas
to Tony Whyman

I think about that and I checked as I can but neither of them will run and also I add another project and add all the packages and uses units in FormX to it so if any?Initialization make the problem I could find it but no, without no problem it will run. Just this project and just this form cause problem and Lazarus it self also doesn't give any error about form error or what ever.

Regards, Ara

http://www.fastmail.com - Choose from over 50 domains or use your own -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151204/5f8f302a/attachment.html>

Reply by email

Aradeonas
to Aradeonas

It seems FPC optimizer know what line will be used so compile them and probably line initialization lines but how I can find out what line will run! It is so ugly that you can not find out what line in your program will run!

Regards, Ara

http://www.fastmail.com - IMAP accessible web-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151204/e15bcfcf/attachment.html>

Reply by email