I just upgraded to wxpython 2.6 unicode from 2.5.3.1.
My app now crashes when closing it. The crash happens after
my EVT_CLOSE handler finished.
What happens is that after the window disappears an unhandled exception dialog from windows pops up. Since this happens after the EVT_CLOSE handler finished I'm at a loss on how to debug this further.
If I use wxversion to select 2.5.3.1 again everything works fine.
What do you do in your EVT_CLOSE handler? Does the crash happen before or after MainLoop exits?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Forgot all about the MainLoop() call...
The print 'blah' statement after the call to MainLoop still gets echoed
to the console. So I presume it crashes afterwards.
You don't happen to create more than on wx.App object do you?
No, I don't and after lots of cutting I have a little sample.
I create a wx.FileConfig because I want a config file even on win32.
I save a reference in my app object e.g. self.config and then call wx.ConfigBase_Set(self.config). If I don't call ConfigBase_Set() everything works fine.
The same behaviour happens in 2.5 if I don't save a reference, so not
doing self.config but just config.
Here is the sample:
import wx
class testApp(wx.App):
def OnInit(self):
self.config = wx.FileConfig( localFilename='temp.ini')
self.config.SetRecordDefaults(True)
wx.ConfigBase_Set(self.config)