[wxPython-users] Re: Again Crash in gtk and debugging

Robin Dunn robin at alldunn.com
Tue Mar 18 21:30:10 PDT 2008


Franz Steinhäusler wrote:
> On Tue, 18 Mar 2008 12:07:26 -0700, Robin Dunn <robin at alldunn.com> wrote:
> 
>> Franz Steinhaeusler wrote:
>>> 2.8.4, Kubuntu 7.10, python 2.5
>>>
>>> Several times, when I quit my app, I have an segmentation fault.
>>> I tried to use gdb, but it said, no debug symbols found and so the stacktrace is
>>> not really expressive.
>>> In the archives, I also found "break g_log". Is that useful too?
>> That works if there is a GTK warning or error log message and you want 
>> to see how it is getting to the point of showing the log.  For a crash 
>> like this it wouldn't be applicable.
>>
>>> My question is:
>>> How can I get debug symbols (with load xy.so or do I have to get an according (wx)pyhton
>>> version?
>> The most reliable way to get the debug symbols is to build your own 
>> Python and wxPython.  (Building your own Python isn't really necessary, 
>> but it helps give you more of the stack context.)
> 
> Hello Robin, thanks.
> That means, the "default" wxpython build, which is downloadable, isn't enough?
> I remember, that wxpyhotn ist build with "debug on".

Normally the builds that I do have the __WXDEBUG__ flag and optimization 
turned on, but not the generation of debug info.  (The __WXDEBUG__ flag 
gives us the ability to turn wx assert failures into Python exceptions.) 
  However the debian/ubuntu packages that I build *do not* turn on 
__WXDEBUG__ because then they would not be binary compatible with the 
packages distributed by the debian/ubuntu folks.

However, there is an option that I should have remembered before.  There 
are a separate set of packages available that turn on full debugging 
info (and turn optimizations off IIRC) that will work with the standard 
python-dbg packages.  So essentially you will end up two instances of 
python binaries installed per python version.  If the dependencies are 
done right then try installing python-wxgtk2.8-dbg, and then running 
your app with python-dbg instead of python.  If your app uses other 
binary extensions then you'll need to install -dbg versions of their 
packages too.



-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list