Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The auidemo sample program core dumps

2 views
Skip to first unread message

defr...@gmail.com

unread,
May 24, 2007, 2:06:09 PM5/24/07
to
I have the wxGTK 2.8.4 distribution built on IRIX 6.5 with the MIPS
7.4 compiler. I have GTK+ 2.4 installed on my system.

I run the auidemo sample program and then repeatedly dock and undock
the toolbars. After a while (always when a docking is finished), I get
a core dump with the following stack trace:

__________

wxWindowBase::GetPosition(this = 0x10) ["window.h":266]
wxAuiManager::OnFloatingPaneMoved(this = 0xb4697010, wnd = 0x27c00,
dir = 162816) ["framemanager.cpp":3468]
wxAuiFloatingFrame::OnMoveFinished(this = 0x10) ["floatpane.cpp":287]
wxAuiFloatingFrame::OnIdle(this = 0x10, event = 0x7f) ["floatpane.cpp":
262]
wxAppConsole::HandleEvent(this = 0x10, handler = 0x7f, func =
-14036992, event = 0x10) ["appbase.cpp":320]
wxEvtHandler::ProcessEventIfMatches(entry = 0xffffffff, handler =
0x97086010, event = 0x10) ["event.cpp":1204]
wxEventHashTable::HandleEvent(this = 0x27dc10, event = 0xad559c00,
self = 0x10) ["event.cpp":877]
wxEvtHandler::ProcessEvent(this = 0x10, event = 0x10) ["event.cpp":
1266]
wxEvtHandler::ProcessEvent(this = 0x10, event = 0x10) ["event.cpp":
1273]
wxAppBase::SendIdleEvents(this = 0x10, win = 0x10, event = 0x10)
["appcmn.cpp":461]
wxAppBase::SendIdleEvents(this = 0x10, win = 0xb6367010, event =
0xb6367010) ["appcmn.cpp":470]
wxAppBase::ProcessIdle(this = 0x0) ["appcmn.cpp":436]
wxapp_idle_callback(<no name> = 0x31310) ["app.cpp":207]
g_idle_dispatch(<stripped>) ["gmain.c":3750]
g_main_dispatch(<stripped>) ["gmain.c":1895]
g_main_context_dispatch(<stripped>) ["gmain.c":2441]
g_main_context_iterate(<stripped>) ["gmain.c":2522]
g_main_loop_run(<stripped>) ["gmain.c":2726]
gtk_main(<stripped>) ["gtkmain.c":1172]
wxEventLoop::Run(this = 0x10) ["evtloop.cpp":76]
wxAppBase::MainLoop(this = 0x0) ["appcmn.cpp":308]
wxAppBase::OnRun(this = 0x10) ["appcmn.cpp":363]
wxEntry(argc = 0x97086000, argv = 0xf) ["init.cpp":449]
main(argc = 127, argv = 0x0) ["auidemo.cpp":50]
__start(<stripped>) ["crt1text.s":177]

__________

This is very repeatable, but unpredictable on when it exactly will
happen. FYI, I am running the display over a network (my server does
not have graphics).

The "this" pointer set to 0x10 looks suspicious?

Any words of wisdom to help me get over this hump?

TIA

--
Marco DeFreitas

defr...@gmail.com

unread,
May 24, 2007, 2:25:03 PM5/24/07
to
More info:

I sometimes get an asset failure when the problem occurs:

../src/common/sizer.cpp(484): assert "WxAssertFailure" failed:
unexpected wxSizerItem::m_kind

Also, I can't (yet) make it fail with regular docking/undocking of
windows. It seems (so far) that the problem is with toolbars.

Robert Roebling

unread,
May 24, 2007, 2:47:49 PM5/24/07
to
defr...@gmail.com wrote:

> I have the wxGTK 2.8.4 distribution built on IRIX 6.5 with the MIPS
> 7.4 compiler. I have GTK+ 2.4 installed on my system.
>
> I run the auidemo sample program and then repeatedly dock and undock
> the toolbars. After a while (always when a docking is finished)

Hm, maybe the frame is getting an idle event after it has
been marked for deletion. No idea how this could happen,
but please test for wxPendingDelete.Member(this) in the
line before the crash and if m_owner_mgr is NULL or not.

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

Robert Roebling

unread,
May 24, 2007, 2:49:38 PM5/24/07
to
defr...@gmail.com wrote:

Here, too, a backtrace would be nice,

defr...@gmail.com

unread,
May 25, 2007, 10:51:10 AM5/25/07
to
On May 24, 2:49 pm, rob...@roebling.de (Robert Roebling) wrote:
> Here, too, a backtrace would be nice,

There does not seem to be a backtrace on the assert. I assume this is
not available on IRIX? During the config process, I did notice the
message that said something like:

WARNING: backtrace() is not available, wxStackWalker will not be
available.

Vadim Zeitlin

unread,
May 25, 2007, 11:01:45 AM5/25/07
to

Yes, this does mean that wx can't show you the backtrace itself, but you
can still get the backtrace from the debugger.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

defr...@gmail.com

unread,
May 25, 2007, 11:35:22 AM5/25/07
to
On May 24, 2:47 pm, rob...@roebling.de (Robert Roebling) wrote:
> Hm, maybe the frame is getting an idle event after it has
> been marked for deletion. No idea how this could happen,
> but please test for wxPendingDelete.Member(this) in the
> line before the crash and if m_owner_mgr is NULL or not.

I'm not sure if this is correct, but I edited window.h and modified
the GetPosition() func as follows:

wxPoint GetPosition() const
{
int x, y;

// MY CODE START
if (wxPendingDelete.Member((wxObject*)this)) {
cerr << "PENDING DELETE!!!" << endl;
sleep(2);
}
// MY CODE END

DoGetPosition(&x, &y);

return wxPoint(x, y);
}

When I die, I still crash on the DoGetPosition() func. Although... it
does seem to be harder now to produce a crash. I assume that it is not
found to be "pending deletion" since the "this" pointer is nil and
there is no "nil" pointer in the pending delete list?.

I noticed problems with my graphical debugger (cvd) so I used the IRIX
command line debugger (dbx) to get a better stack trace:

__________

> 0 wxWindowBase::GetPosition(void) const(this = (nil)) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/include/wx/window.h":286, 0x1011d678]
1 wxAuiManager::OnFloatingPaneMoved(wxWindow*,wxDirection)(this =
0x10a65760, wnd = 0x10b1fbb0, dir = wxUP=64) ["/people/mdefreitas/wx/
wxGTK/wxGTK-2.8.4/src/aui/framemanager.cpp":3468, 0x1012fd28]
2 wxAuiFloatingFrame::OnMoveFinished(void)(this = 0x10c45e20) ["/
people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/aui/floatpane.cpp":287,
0x1015c6b8]
3 wxAuiFloatingFrame::OnIdle(wxIdleEvent&)(this = 0x10c45e20, event
= 0x7fff29d0) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/aui/
floatpane.cpp":262, 0x1015ce5c]
4 wxAppConsole::HandleEvent(wxEvtHandler*,void (wxEvtHandler::*)
(wxEvent&),wxEvent&) const(this = 0x10a4b610, handler = 0x10c45e20,
func = 0, event = 0x7fff29d0) ["/people/mdefreitas/wx/wxGTK/
wxGTK-2.8.4/src/common/appbase.cpp":320, 0x106d4214]
5 wxEvtHandler::ProcessEventIfMatches(const
wxEventTableEntryBase&,wxEvtHandler*,wxEvent&)(entry = 0x10a2fa50,
handler = 0x10c45e20, event = 0x7fff29d0) ["/people/mdefreitas/wx/
wxGTK/wxGTK-2.8.4/src/common/event.cpp":1204, 0x106d97c0]
6 wxEventHashTable::HandleEvent(wxEvent&,wxEvtHandler*)(this =
0x10a2faa8, event = 0x7fff29d0, self = 0x10c45e20) ["/people/
mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/event.cpp":877, 0x106d7ae4]
7 wxEvtHandler::ProcessEvent(wxEvent&)(this = 0x10c45e20, event =
0x7fff29d0) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/
event.cpp":1266, 0x106d89dc]
8 wxEvtHandler::ProcessEvent(wxEvent&)(this = 0x10c46060, event =
0x7fff29d0) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/
event.cpp":1273, 0x106d8a54]
9 wxAppBase::SendIdleEvents(wxWindow*,wxIdleEvent&)(this =
0x10a4b610, win = 0x10c45e20, event = 0x7fff29d0) ["/people/mdefreitas/
wx/wxGTK/wxGTK-2.8.4/src/common/appcmn.cpp":461, 0x1044a94c]
10 wxAppBase::SendIdleEvents(wxWindow*,wxIdleEvent&)(this =
0x10a4b610, win = 0x10a65588, event = 0x7fff29d0) ["/people/mdefreitas/
wx/wxGTK/wxGTK-2.8.4/src/common/appcmn.cpp":470, 0x1044aa2c]
11 wxAppBase::ProcessIdle(void)(this = 0x10a4b610) ["/people/
mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/appcmn.cpp":436,
0x1044a744]
12 ::wxapp_idle_callback(void*)(<no name> = (nil)) ["/people/
mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/gtk/app.cpp":207, 0x10442924]
13 g_idle_dispatch(0x0, 0x0, 0x2df, 0x0, 0x187e, 0x0, 0x10a65900,
0x10a65ad0) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/
glib/gmain.c":3750, 0x1dcc308]
14 g_main_dispatch(0x10a4b8f0, 0x0, 0x2df, 0x0, 0x187e, 0x0,
0x10a65900, 0x10a65ad0) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/
glib-2.4.0.diffbuild/glib/gmain.c":1895, 0x1dc83ec]
15 g_main_context_dispatch(0x10a4b8f0, 0x0, 0x2df, 0x0, 0x187e,
0x0, 0x10a65900, 0x10a65ad0) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/
glib-2.4.0.diffbuild/glib/gmain.c":2441, 0x1dc9960]
16 g_main_context_iterate(0x10a4b8f0, 0x1, 0x0, 0x0, 0x187e, 0x0,
0x10a65900, 0x10a65ad0) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/
glib-2.4.0.diffbuild/glib/gmain.c":2522, 0x1dc9c30]
17 g_main_loop_run(0x10bc99e0, 0x0, 0x2df, 0x0, 0x187e, 0x0,
0x10a65900, 0x10a65ad0) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/
glib-2.4.0.diffbuild/glib/gmain.c":2726, 0x1dca4e0]
18 gtk_main(0x0, 0x0, 0x2df, 0x0, 0x187e, 0x0, 0x10a65900,
0x10a65ad0) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/
gtk/gtkmain.c":1172, 0xbd3cfe8]
19 wxEventLoop::Run(void)(this = 0x10c2d2d8) ["/people/mdefreitas/
wx/wxGTK/wxGTK-2.8.4/src/gtk/evtloop.cpp":76, 0x10468ccc]
20 wxAppBase::MainLoop(void)(this = 0x10a4b610) ["/people/
mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/appcmn.cpp":308,
0x1044a3bc]
21 wxAppBase::OnRun(void)(this = 0x10a4b610) ["/people/mdefreitas/
wx/wxGTK/wxGTK-2.8.4/src/common/appcmn.cpp":363, 0x1044a0ac]
22 ::wxEntry(int&,char**)(argc = 0x7fff2d24, argv = 0x7fff2d44) ["/
people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/common/init.cpp":449,
0x107d18cc]
23 ::main(argc = 1, argv = 0x7fff2d44) ["/people/mdefreitas/wx/
wxGTK/wxGTK-2.8.4/samples/aui/auidemo.cpp":50, 0x100f434c]
24 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/
csu/crt1text.s":177, 0x100f3d38]

__________

The "this" pointer looks good until the very end. It seems that
OnFloatingPaneMoved() tries to get the wxAuiPaneInfo*, given the
wxWindow* that is passed in. Then it tries to get the wxFrame* from
the wxAuiPaneInfo*. The wxFrame* is nil.

Here is the state of the wxWindow passed into OnFloatingPaneMoved()
via the wnd argument:

class wxWindow {
m_refData = (nil)
m_nextHandler = (nil)
m_previousHandler = (nil)
m_dynamicEvents = (nil)
m_pendingEvents = (nil)
m_eventsLocker = 0x10b4ad18
m_enabled = true (1)
union {
m_clientObject = (nil)
m_clientData = (nil)
}
m_clientDataType = wxClientData_None=0
m_windowId = -206
m_parent = 0x10a65588
m_children = class wxWindowList {
m_refData = (nil)
m_count = 0
m_destroy = false (0)
m_nodeFirst = (nil)
m_nodeLast = (nil)
m_keyType = wxKEY_NONE=0
}
m_minWidth = 288
m_minHeight = 31
m_maxWidth = -1
m_maxHeight = -1
m_eventHandler = 0x10b1fbb0
m_windowValidator = (nil)
m_dropTarget = (nil)
m_cursor = class wxCursor {
m_refData = 0x10a645d8
}
m_font = class wxFont {
m_refData = (nil)
}
m_backgroundColour = class wxColour {
m_refData = (nil)
}
m_foregroundColour = class wxColour {
m_refData = (nil)
}
m_caret = (nil)
m_updateRegion = class wxRegion {
m_refData = (nil)
}
m_acceleratorTable = class wxAcceleratorTable {
m_refData = (nil)
}
m_tooltip = (nil)
m_constraints = (nil)
m_constraintsInvolvedIn = (nil)
m_windowSizer = (nil)
m_containingSizer = 0x10b27150
m_autoLayout = 0
m_isShown = 1
m_isEnabled = 1
m_isBeingDeleted = 0
m_hasBgCol = 0
m_hasFgCol = 0
m_hasFont = 0
m_inheritBgCol = 0
m_inheritFgCol = 0
m_inheritFont = 0
m_windowStyle = 548
m_exStyle = 0
m_windowName = class wxString {
m_pchData = 0x10b4c1b4 = "toolbar"
}
m_themeEnabled = false (0)
m_backgroundStyle = wxBG_STYLE_SYSTEM=0
m_palette = class wxPalette {
m_refData = (nil)
}
m_hasCustomPalette = false (0)
m_virtualSize = class wxSize {
x = -1
y = -1
}
m_scrollHelper = (nil)
m_minVirtualWidth = -1
m_minVirtualHeight = -1
m_maxVirtualWidth = -1
m_maxVirtualHeight = -1
m_windowVariant = wxWINDOW_VARIANT_NORMAL=0
m_bestSizeCache = class wxSize {
x = 288
y = 30
}
m_x = 740
m_y = 1
m_width = 288
m_height = 31
m_oldClientWidth = 0
m_oldClientHeight = 0
m_widget = 0x10b1ff70
m_wxwindow = (nil)
m_focusWidget = 0x10b1ff70
m_imData = (nil)
m_scrollBar = {
[0] (nil)
[1] (nil)
}
m_scrollPos = {
[0] 0.0
[1] 0.0
}
m_blockValueChanged = {
[0] false (0)
[1] false (0)
}
m_needParent = 1
m_noExpose = 0
m_nativeSizeEvent = 0
m_hasScrolling = 0
m_hasVMT = 1
m_sizeSet = 0
m_resizing = 0
m_acceptsFocus = 0
m_hasFocus = 0
m_isScrolling = 0
m_clipPaintRegion = 0
m_nativeUpdateRegion = class wxRegion {
m_refData = (nil)
}
m_dirtyTabOrder = 0
m_needsStyleChange = 0
m_mouseButtonDown = 0
m_blockScrollEvent = 0
m_showOnIdle = 1
m_insertCallback = 0x1047c6b0
}

And here is the wxAuiPaneInfo that GetPane(wnd) returned into the pane
variable:

class wxAuiPaneInfo {
name = class wxString {
m_pchData = 0x10c1ca04 = "tb2"
}
caption = class wxString {
m_pchData = 0x10c1caf4 = "Toolbar 2"
}
window = 0x10b1fbb0
frame = (nil)
state = 2108144
dock_direction = 1
dock_layer = 10
dock_row = 0
dock_pos = 730
best_size = class wxSize {
x = 288
y = 31
}
min_size = class wxSize {
x = -1
y = -1
}
max_size = class wxSize {
x = -1
y = -1
}
floating_pos = class wxPoint {
x = 880
y = 286
}
floating_size = class wxSize {
x = 305
y = 55
}
dock_proportion = 100000
buttons = class wxAuiPaneButtonArray {
m_nSize = 16
m_nCount = 1
m_pItems = 0x10c25c90
}
rect = class wxRect {
x = 740
y = 1
width = 288
height = 31
}
}

Note that the frame member is nil.

Does any of this help?

TIA
Marco

Vadim Zeitlin

unread,
May 25, 2007, 8:52:49 PM5/25/07
to
On 25 May 2007 08:35:22 -0700 defr...@gmail.com wrote:

> I'm not sure if this is correct, but I edited window.h and modified
> the GetPosition() func as follows:
>
> wxPoint GetPosition() const
> {
> int x, y;
>
> // MY CODE START
> if (wxPendingDelete.Member((wxObject*)this)) {
> cerr << "PENDING DELETE!!!" << endl;
> sleep(2);
> }
> // MY CODE END
>
> DoGetPosition(&x, &y);
>
> return wxPoint(x, y);
> }
>
> When I die, I still crash on the DoGetPosition() func. Although... it
> does seem to be harder now to produce a crash. I assume that it is not
> found to be "pending deletion" since the "this" pointer is nil and
> there is no "nil" pointer in the pending delete list?.

No, the problem is that the pointer is NULL in the first place.

> I noticed problems with my graphical debugger (cvd) so I used the IRIX
> command line debugger (dbx) to get a better stack trace:
> __________
>
> > 0 wxWindowBase::GetPosition(void) const(this = (nil)) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/include/wx/window.h":286, 0x1011d678]
> 1 wxAuiManager::OnFloatingPaneMoved(wxWindow*,wxDirection)(this =
> 0x10a65760, wnd = 0x10b1fbb0, dir = wxUP=64) ["/people/mdefreitas/wx/
> wxGTK/wxGTK-2.8.4/src/aui/framemanager.cpp":3468, 0x1012fd28]

An obvious fix would be to check that pane.frame != NULL before doing
anything in this function but I don't know this code enough to say whether
it is normal or nor that it can be NULL. I suppose it isn't and so there is
some other bug elsewhere but it would be really great if Ben could confirm
it... I'm not sure if he subscribes to wx-users so I'm cc'ing this to him
in hope he can help. For more context please see

http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/52512

> 2 wxAuiFloatingFrame::OnMoveFinished(void)(this = 0x10c45e20) ["/
> people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/aui/floatpane.cpp":287,
> 0x1015c6b8]
> 3 wxAuiFloatingFrame::OnIdle(wxIdleEvent&)(this = 0x10c45e20, event
> = 0x7fff29d0) ["/people/mdefreitas/wx/wxGTK/wxGTK-2.8.4/src/aui/
> floatpane.cpp":262, 0x1015ce5c]

[keeping this part for the reference]

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

defr...@gmail.com

unread,
May 29, 2007, 9:49:33 AM5/29/07
to
On May 25, 8:52 pm, v...@wxwindows.org (Vadim Zeitlin) wrote:
> An obvious fix would be to check that pane.frame != NULL before doing
> anything in this function but I don't know this code enough to say whether
> it is normal or nor that it can be NULL. I suppose it isn't and so there is
> some other bug elsewhere but it would be really great if Ben could confirm
> it... I'm not sure if he subscribes to wx-users so I'm cc'ing this to him
> in hope he can help.

I will modify the code to do nothing if frame pointer is NULL and see
what happens.

Hopefully Ben can shed some light on this issue. Even if the problem
can't be fixed, it would be great to get a workaround, since the crash
is fairly easy to produce.

Thanks,
Marco

defr...@gmail.com

unread,
May 29, 2007, 4:19:10 PM5/29/07
to
More information:

I think I now have a perfectly repeatable scenario under which I can
produce a core dump. Once the auidemo application comes up, I float
the "Sample Bookmark Toolbar" and then grab it by the "gripper" (not
the frame title bar). I then try to redock the toolbar and once it
"starts" to redock I release the mouse button (before it completes the
drawing of the newly docked toolbar). This seems to give me a core
dump every time.

Note that I am running over the network so the drawing of the
"docking" takes a visually noticable amount of time. Also note that it
doesn't seem to happen (at least not often enough) when I grab the
floating window by the title bar... the gripper seems to be the
consistant method for producing the core dump. Also note that if I
wait for the docking to be completely done before releasing the mouse,
it does not core dump.

defr...@gmail.com

unread,
May 29, 2007, 5:11:27 PM5/29/07
to
I found this post on the Kirix forums:
http://www.kirix.com/community/forums/viewtopic.php?t=180

This sounds a lot like the problem I've been seeing... perhaps it is
already fixed? Is the CVS version Ben mentions in the post already in
wxWidgets 2.8.4?

defr...@gmail.com

unread,
Jun 18, 2007, 6:00:53 PM6/18/07
to
Vadim:

Any word from Ben on this? I currently patched the code to exit if I
get a NULL pointer, but although this seems to fix/hide any problems,
I just want to make sure it is the right thing to do.

In addition, I hate to have things break when I upgrade to a new
version of wxWidgets.

TIA,
Marco

Vadim Zeitlin

unread,
Jun 18, 2007, 6:18:40 PM6/18/07
to
On Mon, 18 Jun 2007 15:00:53 -0700 defr...@gmail.com wrote:

> Any word from Ben on this?

Unfortunately not.

> I currently patched the code to exit if I
> get a NULL pointer, but although this seems to fix/hide any problems,
> I just want to make sure it is the right thing to do.

Sorry, I don't know this code at all so I really can't help with it.

defr...@gmail.com

unread,
Jun 19, 2007, 9:56:14 AM6/19/07
to
No problem. I'll try posting on the Kirix forum.

Thanks!
Marco


0 new messages