troubleshooting Question

Main thread of application stopped

Avatar of Stef Merlijn
Stef MerlijnFlag for Netherlands asked on
Delphi
7 Comments1 Solution43 ViewsLast Modified:
Hi,

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;
begin
    MySettings := ID;
    MyForm := TFMyActualForm.Create(Application);
    MyForm.Show;
  end;
end;

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?
ASKER CERTIFIED SOLUTION
RBertora
Tech Director

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros