My application sometimes core dumps when I load a perspective. The application seems to be OK under Windows.
My test application docks a pane on the left and has a button in the center. When the application comes up, it saves the perspective in a wxString. The callback of the button in the center pane merely loads the perspective that was saved at startup.
When I undock the left pane and press the button, the pane redocks as expected (most of the time). However, sometimes I get a core dump.
The panel on the left is fairly complex (it has a toolbar, a list control, etc). If I just use a simple text control for the left panel, I can't seem to get a core dump. Perhaps this is related to the complexity of the docked/undocked panel? But again, it works ok under Windows.
Looks like I die on line 456 of src/common/sizer.cpp. This is what the call stack looks like when I core dump:
___________________
> 0 wxSizerItem::IsShown(void) const(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/sizer.cpp":456, 0x10187d24]
1 wxAuiManager::OnRender(wxAuiManagerEvent&)(0x10660e00, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/aui/framemanager.cpp":3568, 0x10115154]
2 wxAppConsole::HandleEvent(wxEvtHandler*,void (wxEvtHandler::*)(wxEvent&),wxEvent&) const(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/appbase.cpp":320, 0x103629c8]
3 wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase&,wxEvtHandler*,wxEvent&)(0x10664a50, 0x0, 0x7fff1f58, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":1204, 0x1032d108]
4 wxEventHashTable::HandleEvent(wxEvent&,wxEvtHandler*)(0x0, 0x7fff1f58, 0x10660e00, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":877, 0x1032bfb0]
5 wxEvtHandler::ProcessEvent(wxEvent&)(0x10660e00, 0x7fff1f58, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":1266, 0x1032ca50]
6 wxAuiManager::ProcessMgrEvent(wxAuiManagerEvent&)(0x10660e00, 0x7fff1f58, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/aui/framemanager.cpp":815, 0x10114acc]
7 wxAuiManager::Render(wxDC*)(0x10664a50, 0x7fff2000, 0xffffffff, 0x7fff1f58, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/aui/framemanager.cpp":3609, 0x101148f8]
8 wxAuiManager::Repaint(wxDC*)(0x10660e00, 0x7fff2000, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/aui/framemanager.cpp":3642, 0x101149d4]
9 wxAuiManager::OnPaint(wxPaintEvent&)(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/aui/framemanager.cpp":3652, 0x101155e8]
10 wxAppConsole::HandleEvent(wxEvtHandler*,void (wxEvtHandler::*)(wxEvent&),wxEvent&) const(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/appbase.cpp":320, 0x103629c8]
11 wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase&,wxEvtHandler*,wxEvent&)(0x10664a50, 0x0, 0x7fff23f8, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":1204, 0x1032d108]
12 wxEventHashTable::HandleEvent(wxEvent&,wxEvtHandler*)(0x0, 0x7fff23f8, 0x10660e00, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":877, 0x1032bfb0]
13 wxEvtHandler::ProcessEvent(wxEvent&)(0x10660e00, 0x7fff23f8, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/event.cpp":1266, 0x1032ca50]
14 wxWindow::GtkSendPaintEvents(void)(0x10660bc0, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/gtk/window.cpp":3762, 0x1013592c]
15 ::gtk_window_expose_callback(_GtkWidget*,_GdkEventExpose*,wxWindow*)(0x10664a50, 0x10660bc0, 0x10660bc0, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/gtk/window.cpp":514, 0x1012cbf8]
16 _gtk_marshal_BOOLEAN__BOXED(0x7fff2540, 0x0, 0xffffffff, 0x7fff2640, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkmarshalers.c":82, 0x5fe20b9c]
17 g_closure_invoke(0x1065ad98, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/gobject/gclosure.c":437, 0x6499e68]
18 signal_emit_unlocked_R(0x105d5fa8, 0x0, 0x105e2c6c, 0x7fff2800, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/gobject/gsignal.c":2436, 0x64b0724]
19 g_signal_emit_valist(0x10664a50, 0x69, 0x6c, 0x7fff2970, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/gobject/gsignal.c":2205, 0x64af578]
20 g_signal_emit(0x10664a50, 0x0, 0xffffffff, 0x7fff2a28, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/gobject/gsignal.c":2239, 0x64afa5c]
21 gtk_widget_event_internal(0x105e2c6c, 0x7fff2a28, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkwidget.c":3563, 0x5ff3cc60]
22 gtk_widget_send_expose(0x10664a50, 0x7fff2a28, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkwidget.c":3395, 0x5ff3c8f8]
23 gtk_main_do_event(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkmain.c":1541, 0x5fe1d99c]
24 gdk_window_process_updates_internal(0x10662608, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gdk/gdkwindow.c":2052, 0x40333f4]
25 gdk_window_process_all_updates(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gdk/gdkwindow.c":2100, 0x40334d8]
26 gtk_container_idle_sizer(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkcontainer.c":1116, 0x5fd91ed0]
27 g_idle_dispatch(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/glib/gmain.c":3750, 0x4f6c308]
28 g_main_dispatch(0x105b8c38, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/glib/gmain.c":1895, 0x4f683ec]
29 g_main_context_dispatch(0x105b8c38, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/glib/gmain.c":2441, 0x4f69968]
30 g_main_context_iterate(0x105b8c38, 0x1, 0x1, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/glib/gmain.c":2522, 0x4f69c30]
31 g_main_loop_run(0x1064abf8, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/glib2/2.4.0/glib-2.4.0.diffbuild/glib/gmain.c":2726, 0x4f6a4e8]
32 gtk_main(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/xlv1/freeware/2003.Nov/gtk2+/2.4.0/gtk+-2.4.0.diffbuild/gtk/gtkmain.c":1172, 0x5fe1cfe8]
33 wxEventLoop::Run(void)(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/gtk/evtloop.cpp":76, 0x102111f8]
34 wxAppBase::MainLoop(void)(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/appcmn.cpp":308, 0x101fe590]
35 wxAppBase::OnRun(void)(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/appcmn.cpp":363, 0x101fe378]
36 ::wxEntry(int&,char**)(0x10664a50, 0x0, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/cm/vobs/vob_3rd/wxwidgets/IRIX/wx_WORK.wxGTK-2.8.4/wxGTK-2.8.4/src/common/init.cpp":449, 0x103b2280]
37 ::main(0x1, 0x7fff2d24, 0xffffffff, 0x10664a50, 0xffffffff, 0x7fff1f58, 0x7fff1f58, 0x7fff1f58) ["/people/mdefreitas/wx/samples/ghui/utils/tst1/tst1.c":42, 0x100fd27c]
38 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s":177, 0x100cebf8]
___________________
This is my stripped down test program, with a simple text control for the left pane. Note that this version does not core dump, but I include it to show what I am doing. The only difference between this version and the version that does core dump, is that I have a more complex panel on the left, which is spread out over several files:
_______________
- Code: Select all
#include "wx/wx.h"
#include "wx/aui/aui.h"
class TstApp : public wxApp
{
public:
virtual bool OnInit();
};
class TstFrame : public wxFrame
{
public:
enum {
ID_Def = wxID_HIGHEST + 1
};
TstFrame(const wxString& title);
~TstFrame();
private:
void onExit(wxCommandEvent& event);
void onDef(wxCommandEvent& event);
wxAuiManager m_mgr;
wxString m_def_perspective;
DECLARE_EVENT_TABLE()
};
DECLARE_APP(TstApp)
IMPLEMENT_APP(TstApp)
bool TstApp::OnInit()
{
TstFrame *frame = new TstFrame(_T("Tst"));
SetTopWindow(frame);
frame->Show(true);
return true;
}
BEGIN_EVENT_TABLE(TstFrame, wxFrame)
EVT_MENU(wxID_EXIT, TstFrame::onExit)
EVT_BUTTON(TstFrame::ID_Def, TstFrame::onDef)
END_EVENT_TABLE()
TstFrame::TstFrame(const wxString& title) : wxFrame(NULL, wxID_ANY,
title)
{
m_mgr.SetManagedWindow(this);
wxMenuBar *menuBar = new wxMenuBar();
wxMenu *fileMenu = new wxMenu;
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt-X"));
menuBar->Append(fileMenu, _T("&File"));
SetMenuBar(menuBar);
//~~~ add some panes
wxTextCtrl *t1 = new wxTextCtrl(this, -1, _T("test"));
m_mgr.AddPane(t1, wxAuiPaneInfo().Name(_T("t1")).Caption(_T("t1")).Left());
wxButton *b = new wxButton(this, ID_Def, _T("DEFAULT"));
m_mgr.AddPane(b, wxAuiPaneInfo().Name(_T("content")).CenterPane());
m_def_perspective = m_mgr.SavePerspective();
m_mgr.Update();
}
TstFrame::~TstFrame()
{
m_mgr.UnInit();
}
void TstFrame::onExit(wxCommandEvent& event)
{
Close();
}
void TstFrame::onDef(wxCommandEvent& event)
{
m_mgr.LoadPerspective(m_def_perspective);
}
______________
Any ideas what is going on?
I can tar up my more complicated panel, if need be...