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

Robin Dunn robin at alldunn.com
Sat Mar 22 15:31:16 PDT 2008


Franz Steinhäusler wrote:
> On Wed, 19 Mar 2008 09:37:38 +0100, Franz Steinhaeusler <franz.steinhaeusler at gmx.at> wrote:
> 
> So after that, I finally get a backtrace:
> 
> break g_log (function is not known(?)
> 
> looks a littel bit complicated for me:


Start at the bottom and work up to the top.


> 
> (gdb) bt
> #0  0x00000000 in ?? ()

But it is crashing.

> #1  0xb64d95cb in _wrap_TopLevelWindow_SetTitle (args=0x8e74b24,
>     kwargs=0x8e70a34) at src/gtk/_windows_wrap.cpp:5718

A call is made from Python to the C wrapper around the C++ 
wxTopLevelWindow::SetTitle

> #2  0x0814f0a3 in PyCFunction_Call (func=0x882af4c, arg=0x8e74b24,
>     kw=0x8e70a34) at ../Objects/methodobject.c:77
> #3  0x08062ce9 in PyObject_Call (func=0x882af4c, arg=0x8e74b24, kw=0x8e70a34)
>     at ../Objects/abstract.c:1860
> #4  0x080ef035 in ext_do_call (func=0x882af4c, pp_stack=0xbfae81b0, flags=3,
>     na=0, nk=0) at ../Python/ceval.c:3844
> #5  0x080e9b33 in PyEval_EvalFrameEx (f=0x8fd65bc, throwflag=0)
>     at ../Python/ceval.c:2307
> #6  0x080ebee4 in PyEval_EvalCodeEx (co=0x86e1ce8, globals=0x8754714,
>     locals=0x0, args=0x8fd5768, argcount=2, kws=0x8fd5770, kwcount=0,
>     defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2831
> #7  0x080ee72f in fast_function (func=0x883d174, pp_stack=0xbfae8880, n=2,
>     na=2, nk=0) at ../Python/ceval.c:3660
> #8  0x080ee38d in call_function (pp_stack=0xbfae8880, oparg=1)
>     at ../Python/ceval.c:3585
> #9  0x080e9881 in PyEval_EvalFrameEx (f=0x8fd5604, throwflag=0)
>     at ../Python/ceval.c:2267
> #10 0x080ee632 in fast_function (func=0x8d0e804, pp_stack=0xbfae8e80, n=2,
>     na=2, nk=0) at ../Python/ceval.c:3650
> #11 0x080ee38d in call_function (pp_stack=0xbfae8e80, oparg=1)
> ---Type <return> to continue, or q <return> to quit---
>     at ../Python/ceval.c:3585
> #12 0x080e9881 in PyEval_EvalFrameEx (f=0x8eaa66c, throwflag=0)
>     at ../Python/ceval.c:2267
> #13 0x080ebee4 in PyEval_EvalCodeEx (co=0x8c58388, globals=0x8c1f8f4,
>     locals=0x0, args=0x8d54b38, argcount=2, kws=0x0, kwcount=0, defs=0x0,
>     defcount=0, closure=0x0) at ../Python/ceval.c:2831
> #14 0x0814e7bf in function_call (func=0x8d10264, arg=0x8d54b24, kw=0x0)
>     at ../Objects/funcobject.c:517
> #15 0x08062ce9 in PyObject_Call (func=0x8d10264, arg=0x8d54b24, kw=0x0)
>     at ../Objects/abstract.c:1860
> #16 0x0806c268 in instancemethod_call (func=0x8d10264, arg=0x8d54b24, kw=0x0)
>     at ../Objects/classobject.c:2509
> #17 0x08062ce9 in PyObject_Call (func=0x8deb2b4, arg=0x8dd2964, kw=0x0)
>     at ../Objects/abstract.c:1860
> #18 0x080eda07 in PyEval_CallObjectWithKeywords (func=0x8deb2b4,
>     arg=0x8dd2964, kw=0x0) at ../Python/ceval.c:3433

Python code is being executed  ^^^

> #19 0xb7bfec1b in wxPyCallback::EventThunker (this=0x8e673c8,
>     event=@0xbfae989c) at src/helpers.cpp:1473

The wxEvent is being dispatched to a python event binding.  ^^^

> #20 0xb72f325f in wxAppConsole::HandleEvent (this=0x8c82408,
>     handler=0x8e673c8, func=
>     (void ( class wxEvtHandler::*)(class wxEvent &,)) -151519898,
>     event=@0xbfae989c) at ../src/common/appbase.cpp:320
> #21 0xb73add36 in wxEvtHandler::ProcessEventIfMatches (entry=@0x8e67d80,
> ---Type <return> to continue, or q <return> to quit---
>     handler=0x8e673c8, event=@0xbfae989c) at ../src/common/event.cpp:1204
> #22 0xb73ae24d in wxEvtHandler::SearchDynamicEventTable (this=0x8e673c8,
>     event=@0xbfae989c) at ../src/common/event.cpp:1386
> #23 0xb73afc3d in wxEvtHandler::ProcessEvent (this=0x8e673c8,
>     event=@0xbfae989c) at ../src/common/event.cpp:1262
> #24 0xb774640c in wxNotebookBase::SendPageChangedEvent (this=0x8e673c8,
>     nPageOld=-1, nPageNew=-1) at ../src/common/nbkbase.cpp:81

It is getting turned into a wxEvent  ^^^

> #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.  ^^^


> #26 0xb6be8ecd in _gtk_marshal_VOID__POINTER_UINT ()
>    from /usr/lib/libgtk-x11-2.0.so.0
> #27 0xb6ee8772 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #28 0xb6ef9611 in ?? () from /usr/lib/libgobject-2.0.so.0
> #29 0x08e61d08 in ?? ()
> #30 0x00000000 in ?? ()
> 
> 
> Who can help me evaluating it? ;)


So the hint this gives you is that you should take a closer look at  any 
page changing events, and how they might result in a SetTitle call, and 
what might be getting corrupted in the meantime.

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



More information about the wxpython-users mailing list