Avatar of Stef Merlijn
Stef Merlijn
Flag for Netherlands

asked on 

Main thread of application stopped


In my application I need to start several instances of the same form, each one with unique settings.
Multiple instances might be opened for a while. The main application must remain available to work in.
Sometimes when I push f.e. the save-button on one of these forms the application freezes and in the Delphi IDE I see "Main thread stopped : 1492" in the titlebar. After that the only way to recover from this is to shutdown Delphi via taskmanager and restart).
procedure TFMain.OpenMyForm(CONST ID : String; vMakeCopy : Boolean);
var MyForm : TForm;
    MySettings := ID;
    MyForm := TFMyActualForm.Create(Application);

Open in new window

Does anyone have any idea what might be a possible cause? Or maybe there is a better way to create instances of the for?

Avatar of undefined
Last Comment

8/22/2022 - Mon