ShowModal() never returns when events are being fired

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

ShowModal() never returns when events are being fired

Post by Vexator »

This problem has been adressed multiple times over the last years but it's still not solved:

http://trac.wxwidgets.org/ticket/11273
http://trac.wxwidgets.org/ticket/4110
http://trac.wxwidgets.org/ticket/2631

I'm working on a wxWidgets-based game editor using GLCanvas for 3D output. The canvas is updated every 16ms when a wxTimer event is fired. When this feature is turned on, dialogs shown by use of ShowModal() will never return. They are merely hidden when a button has been pressed. If I turn automatic updates off, it works as expected. Is someone working on a fix or is there a known work-around? (Apart from manually stopping all timers when a modal dialog is opened and then starting them again..)

I'm using wxWidgets 2.9.3 on Windows 7.

Thank you!
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Re: ShowModal() never returns when events are being fired

Post by Vexator »

Anyone? I can't be the only one in this situation..
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: ShowModal() never returns when events are being fired

Post by doublemax »

Could it be the same problem as this?
http://forums.wxwidgets.org/viewtopic.php?f=1&t=33621

Solution was that you have to create a wxPaintDC in the paint event handler, even if you don't use it.
Use the source, Luke!
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Re: ShowModal() never returns when events are being fired

Post by Vexator »

Thanks for the reply!

I do create a wxPaintDC in the event handler. I think the problem is not the paint event by itself but that it's issued in regular, short intervals.
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: ShowModal() never returns when events are being fired

Post by doublemax »

Can you create a minimal patch to one of the wxWidgets opengl samples to demonstrate the problem?
Use the source, Luke!
Post Reply