Re: [wxpython-users] SEG FAULT
by Robin Dunn other posts by this author
May 8 2008 9:17AM messages near this date
[wxpython-users] SEG FAULT
|
Re: [wxpython-users] SEG FAULT
Phillip Watts wrote:
> When I do THIS:
> import wx
> import wx.html
>
> class doc:
> def __init__(s,page=''):
> s.help = wx.html.HtmlHelpController(style=wx.html.HF_DEFAULT_STYLE|
> wx.html.HF_DIALOG|wx.html.HF_MODAL)
> s.help.AddBook('doc/pipos.hpp')
> if page: s.display(page)
>
> def display(s,page):
> s.help.Display(page)
>
> As opposed to THIS:
> s.help = wx.html.HtmlHelpController(style=wx.html.HF_DEFAULT_STYLE)
>
> I get a SEG FAULT after I have closed the last frame.(on Kubuntu)
The crash is happening in the destructor of the help controller when the
other top level windows of the app have already been deleted. You can
workaround the problem by forcing the help controller to do its cleanup
before the app's main frame is destroyed. In my sample I just added a
EVT_CLOSE event handler to the frame that looks like this:
def OnCloseWindow(self, evt):
del self.help
evt.Skip()
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Phillip Watts
Robin Dunn
Phillip Watts
Andrea Gavana
Phillip Watts
Andrea Gavana
|