Re: Re: Segfaults and debug builds

Robin Dunn <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
Jonathan Schultz wrote:
> Thanks for the help. The debug info didn't reveal very much other than
> obviously corrupted memory pointers. I can't seem to get a consistent
> result, ie when I fiddle with the Python script I get a different
> segfault. But it does seem to be related to trapping incorrectly
> called Python methods. Here is a very simple example:
>
>     import wx
>
>     app = wx.App()
>     #frame = wx.Frame(None)    # works OK
>     frame = wx.Frame()          # Segfaults
>     panel = wx.Panel(frame)
>
>

I thought there was an assert that would catch this situation, but maybe
I was thinking of something else. In a nutshell, creating a window
object with no parameters creates the C++ (and Python) object but does
NOT create the UI object and you can not do anything with the window,
except set some extra flags or similar simple things, until the Create
method is called. That includes using it as a parent window. Using the
constructors that take parameters does it all in one step, and is called
a 1-phase create versus the 2-phase create where you have to call Create
yourself.

I'll check if there is a way we can guard against this problem. See
https://github.com/wxWidgets/Phoenix/issues/652


-- 
Robin Dunn
Software Craftsman
http://wxPython.org

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.