ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
Re: [wxpython-users] SEG FAULT
by Andrea Gavana other posts by this author
May 8 2008 6:36AM messages near this date
Re: [wxpython-users] SEG FAULT | Re: [wxpython-users] SEG FAULT
Hi Phillip

On Thu, May 8, 2008 at 2:17 PM, 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)
> 
>  Even worse, on WinXp I have to press CTRL-C to close the app.
>  I have put in a print statement after app.MainLoop().
>  It never reaches the print.
> 
>  I REALLY like help being modal.  It saves confusion.
>  It also allows me to Raise() the window below it.  Because
>  it is modal, the frame which calls help.display() waits and does the Raise().
>  Otherwise the user might have to manually raise it.  Not good.
>  Anyone help with this?  Thanks
> 
>  PERHAPS the instance of  HtmlHelpController() is never Destroy()ed,
>  causes the problem.  ??  How would I code that?

Uhm, can you see what happens if you call:

print wx.GetTopLevelWindows()

When the last top level window of your app is destroyed? Also, have
you tried giving a parent window to HtmlHelpController to see if the
problem disappears? I have never used HTMLHelpController but the fact
that you have to hit Ctrl+C on Windows means that some TLWs are not
destroyed when the app exits and one way to insure that, IIUC, is to
give a parent to those HtmlHelpController.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved