ShowMessage() doesn't work in threads created with TThread in Gtk+
Original Reporter info from Mantis: teminian
-
Reporter name: Robert Teminian
Original Reporter info from Mantis: teminian
- Reporter name: Robert Teminian
Description:
If I call ShowMessage() under a thread created from a TThread I see so many errors. It looks like the application stops working, leaving some instructions in the queue, and if I work again the stopped queue resumes working in some way.
Additional information:
The source code I attached works perfectly as expected in Windows, but in Gtk+ environment it generates a lot of errors and stops working. In Unit1.pas I also captured error message which might be meaningful enough to you debug the widgetset.
The application has two buttons. Button2 calls ShowMessage() at the main Unit1 thread, and Button1 makes a TThread object, which calls ShowMessage() in this way
-TForm1 creates a ClassA thread
-ClassA.Create calls ShowMessage()
-ClassA.Execute Create a ClassB thread, yet another thread. and frees itself.
-ClassB.Create calls ShowMessage()
-ClassB.Execute calls ShowMessage()
I recommend you to build and run each ShowMessage() so that you can review the errors.
Mantis conversion info:
- Mantis ID: 20981
- Version: 0.9.30.2