Again Crash in gtk and debugging

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? My question is:
How can I get debug symbols (with load xy.so or do I have to get an according (wx)pyhton
version?

I suspect, by quitting the app, the program receives still some events, for ojbects, which
are in the process of being destroyed. But its hard to figure out, except an debugger with
according debug symbols

···

--

Franz Steinhaeusler

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".

I suspect, by quitting the app, the program receives still some events, for ojbects, which
are in the process of being destroyed. But its hard to figure out, except an debugger with
according debug symbols

Are you exiting the app by closing all top-level windows and letting
MainLoop exit naturally? Or are you doing something more drastic like
calling wx.Exit()?

No, the normal way, with EVT_CLOSE on the mainframe.

···

On Tue, 18 Mar 2008 12:07:26 -0700, Robin Dunn <robin@alldunn.com> wrote:
--
Franz Steinhaeusler

Hello, for the record, if another one is interested:

apt-get install python-dbg
apt-get install python-wxgtk2.8-dbg
Oh, that are 50 MB download and used 164 MB on the harddisk.

the commandline looks than like:
gdb --args python-dbg yourapp.py

···

On Wed, 19 Mar 2008 17:50:18 -0700, Robin Dunn <robin@alldunn.com> wrote:

Franz Steinhaeusler wrote:

[...]

apt-get install python-wxgtk2.8-dbg should do the trick(?)

If the dependencies are correct. I don't remember if I ever tested that
specific scenario however. If it doesn't automatically pull in a
python-*-dbg package and whatever else it might need for you then it
shouldn't be too hard for you to do it yourself

--
Franz Steinhaeusler

Second:
Under normal wxpython no problem
but called with python-dbg:
[Debug] 11:50:01: wxColour::Set - couldn't set to colour string '#000000,face:Monospace,size:9'

Is there a problem with the font (wxpython-dbg do not know, but "normal" wxpython do?) or with the color?

···

On Wed, 19 Mar 2008 09:37:38 +0100, Franz Steinhaeusler <franz.steinhaeusler@gmx.at> wrote:

On Tue, 18 Mar 2008 21:30:10 -0700, Robin Dunn <robin@alldunn.com> wrote:

Franz Steinhäusler wrote:

On Tue, 18 Mar 2008 12:07:26 -0700, Robin Dunn <robin@alldunn.com> wrote:

[...]

Hello Robin, thanks.
That means, the "default" wxpython build, which is downloadable, isn't enough?
I remember, that wxpyhotn ist build with "debug on".

[...]

--
Franz Steinhaeusler

I simply made a "wild" workaround. I discovered the functions of wxFrame
were the problems, when the application quits.
The IsBeingDeleted always results False. So I created a variable, which
in initialised on the very beginning of the wxFrame creation.
self.disableeventhandling = False

When EVT_CLOSE Function is called, I set the variable to true, when I
don't need any Eventhandling anymore. On the critical sections in the
event handling function, I queried the variable.

···

Am Thu, 20 Mar 2008 12:17:35 +0100 schrieb Franz Steinhusler:

Who can help me evaluating it? :wink:

--
Franz Steinhaeusler

Franz Steinhäusler wrote:

···

On Sat, 22 Mar 2008 15:31:16 -0700, Robin Dunn <robin@alldunn.com> wrote:

#25 0xb76b891e in gtk_notebook_page_changed_callback (widget=0x8e5c228,
    page=0, notebook=0x8e673c8) at ../src/gtk/notebook.cpp:111

Here a notebook page changed event is happening. ^^^

That is a helpful information. It happens on notebook Page Change event.
So here, i would think, why it is fired on the shutdown of the app.

Probably because it is incrementally destroying the page windows of the notebook instead of doing them all at once. So when the current page is destroyed the notebook selects a new page, and sends the events for the change.

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