Daniell Freed wrote:
I wondering if anyone has seen this before. In my application, any time I make a call to wx::MessageBox(), the application hangs and chews up 100% of the CPU.
The call looks like this:
Wx::MessageBox
(
$message . "\n" .
"Would you like to generate a debug stack trace?",
$title,
wxICON_ERROR|wxYES_NO
);
If I write just a simple little script that calls this it works fine, so it is
something in my application that is causing this. Is it because I'm not
passing a parent window to it? Because I'm using this for error reporting I
don't have access to the top level window object. I ran it with the Perl
debugger, and turned on tracing just before this call and this is all that is
does:
For the records, Wx::MessageBox works without a parent window, but
you can retrieve a top window (if there is one) using
wxTheApp->GetTopWindow. Maybe you could try if having the window with
the wxSTAY_ON_TOP flag you mention later in the thread as a parent to
the dialog box fixes the issue you are having.
Regards,
Mattia