Lazarus

Programming => General => Topic started by: dietmar on August 01, 2021, 02:32:07 pm

Title: ModalResult let Application Close/Crash
Post by: dietmar on August 01, 2021, 02:32:07 pm
Hello,

I have a button on the main form which opens a bsdialog modal form:
frmTest.ShowModal;

If the ModalResult of the OK-Button on the modal form is mrNone, nothing happens (as expected). As soon as I set that to mrOk, the form closes (what is ok), but then the application immediately terminates without any error.

I tried to debug with F7/F8, which led to strange assembler tracings and finally let Lazarus crashes completely!

Any ideas what's going wrong here?

Thx
--Dietmar
Title: Re: ModalResult let Application Close/Crash
Post by: jamie on August 01, 2021, 02:44:11 pm
Sounds like you have an uncreated form.

is this form created before using the ShowModal ?

Please show a very short simple example.
Title: Re: ModalResult let Application Close/Crash
Post by: dietmar on August 01, 2021, 09:07:14 pm
You are right - I forgot to create it first.

Sorry for bothering...

--Dietmar
TinyPortal © 2005-2018