Author Topic: LINUX: Crash when closing workspace  (Read 6760 times)

Offline st3vie

  • Multiple posting newcomer
  • *
  • Posts: 41
LINUX: Crash when closing workspace
« on: September 28, 2005, 12:06:18 pm »
i don't know if this might help with the crash when closing all the projects in a workspace (like in that vritualdub).
From gdb:
Code
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1228278096 (LWP 7488)]
0xb79fa83c in wxGenericTreeCtrl::ItemHasChildren () from /usr/lib/libwx_gtk2u_core-2.6.so.0

when i continue the program, i get the message "Something has gone wrong inside CB and it will...". When i click ok
i get the following from gdb:
Code
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()

now CB isn't closed yet. When i continue again i get:
Code
Couldn't get registers: No such process.

now CB has closed.

-st3vie

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: paths wrong when importing MSWorkspaces
« Reply #1 on: September 28, 2005, 01:11:43 pm »
I know *exactly* where it segfaults, it just doesn't make sense why...
Be patient!
This bug will be fixed soon...

Offline st3vie

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: LINUX: Crash when closing workspace
« Reply #2 on: September 28, 2005, 02:00:14 pm »
since it seems to crash during the closing of the projects, i tried to close the projects manually, one-by-one. This also causes CB to crash. Not always, but often on the third project i close.

then gdb gives sometimes a different message than the one in my earlier post, like this:
Code
Program received signal SIGSEGV, Segmentation fault.
0xb79b097e in wxGenericTreeCtrl::GetNextChild () from /usr/lib/libwx_gtk2u_core-2.6.so.0

-st3vie

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LINUX: Crash when closing workspace
« Reply #3 on: September 28, 2005, 04:00:55 pm »
If you want to have a go at it, the crash happens in sdk/globals.cpp, inside DoRememberExpandedNodes() and DoExpandRememberedNode(). It happens when the code-completion plugin sees that the active project changed (as a result of a project being closed) and asks the class browser to rebuild the class tree (for the new active project, if any).
Either the tree or a wxTreeItemId becomes invalid during the call...
What's weird is that it doesn't crash when switching between open projects (essentially the same thing: the active project changes)...
Be patient!
This bug will be fixed soon...

Offline st3vie

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: LINUX: Crash when closing workspace
« Reply #4 on: September 29, 2005, 10:15:31 pm »
okay, thanks. i'll probably have a look in the weekend.

-st3vie

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: LINUX: Crash when closing workspace
« Reply #5 on: September 29, 2005, 11:33:55 pm »
Try with the "extra stability" (aka "crash protection") enabled... also, mind posting the backtrace?

Joker

  • Guest
Re: LINUX: Crash when closing workspace
« Reply #6 on: October 02, 2005, 11:25:42 am »
here's a backtrace of a similar error, different spot (still same reason, I'm sure.. faulty tree as someone already said) WITHOUT extra stability enabled:

Quote
Program received signal SIGSEGV, Segmentation fault.
0x0000002a966086f2 in wxGenericTreeCtrl::GetNextChild ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
(gdb) bt
#0  0x0000002a966086f2 in wxGenericTreeCtrl::GetNextChild ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#1  0x0000002a966086cd in wxGenericTreeCtrl::GetFirstChild ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#2  0x0000002a9573137e in DoRememberExpandedNodes (tree=0x7e7160,
    parent=@0x7fbfffe9d8, nodePaths=@0x7fbfffe9e0, path=@0x7fbfffe990)
    at globals.cpp:176
#3  0x0000002a9573195a in SaveTreeState (tree=0x7e7160, parent=@0x7fbfffe9d8,
    nodePaths=@0x7fbfffe9e0) at globals.cpp:246
#4  0x0000002a9a2e1055 in ClassBrowser::Update (this=0x9b7310) at parser.h:117
#5  0x0000002a9a2e0fed in ClassBrowser::SetParser (this=0x7e7160,
    parser=0x14075c0) at classbrowser.cpp:87
#6  0x0000002a9a2e861e in NativeParser::SetClassBrowserProject (this=0x842ff0,
    project=0x14075c0) at nativeparser.h:14
#7  0x0000002a9a2e54f3 in CodeCompletion::OnProjectActivated (this=0x7e7160,
    event=@0x7fbfffec40) at sdk_events.h:29
#8  0x0000002a96b35b77 in wxAppConsole::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#9  0x0000002a96bc9a24 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/local/lib/libwx_base-2.6.so.0
#10 0x0000002a96bc8ef3 in wxEventHashTable::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#11 0x0000002a96bc9b99 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
   from /usr/local/lib/libwx_base-2.6.so.0
#12 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#13 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#14 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#15 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#16 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#17 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#18 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#19 0x0000002a95751564 in PluginManager::NotifyPlugins (this=0x77bdb0,
    event=@0x7fbfffec40) at pluginmanager.cpp:429
#20 0x0000002a95761a0f in ProjectManager::SetProject (this=0x7245d0,
    project=0x7fbfffec40, refresh=true) at projectmanager.cpp:358
#21 0x0000002a95764264 in ProjectManager::CloseActiveProject (this=0x7245d0,
    dontsave=116) at projectmanager.h:22
#22 0x0000002a95763fed in ProjectManager::CloseAllProjects (this=0x7245d0,
    dontsave=116) at projectmanager.cpp:637
---Type <return> to continue, or q <return> to quit---
#23 0x0000002a95764d03 in ProjectManager::CloseWorkspace (this=0x7245d0)
    at projectmanager.cpp:904
#24 0x0000000000429a4f in MainFrame::DoCloseCurrentWorkspace (this=0x7e7160)
    at main.cpp:940
#25 0x000000000042d2fa in MainFrame::OnApplicationClose (this=0xf909c0,
    event=@0x7fbfffefc0) at main.cpp:1355
#26 0x0000002a96b35b77 in wxAppConsole::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#27 0x0000002a96bc9a24 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/local/lib/libwx_base-2.6.so.0
#28 0x0000002a96bc8ef3 in wxEventHashTable::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#29 0x0000002a96bc9b99 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#30 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#31 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#32 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#33 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#34 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
   from /usr/local/lib/libwx_base-2.6.so.0
#35 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#36 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#37 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#38 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#39 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#40 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#41 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#42 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#43 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#44 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#45 0x0000002a965d32ec in wxWindowBase::Close ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#46 0x0000002a964d1330 in gtk_frame_delete_callback ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#47 0x0000002a975fd013 in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#48 0x0000002a98016056 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#49 0x0000002a980258ce in g_signal_emit_by_name ()
   from /usr/lib/libgobject-2.0.so.0
#50 0x0000002a98024713 in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#51 0x0000002a98024bd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#52 0x0000002a976cbda6 in gtk_widget_send_expose ()
   from /usr/lib/libgtk-x11-2.0.so.0
#53 0x0000002a975fac94 in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#54 0x0000002a9792db93 in _gdk_events_queue ()
   from /usr/lib/libgdk-x11-2.0.so.0
#55 0x0000002a9836f90c in g_main_depth () from /usr/lib/libglib-2.0.so.0
#56 0x0000002a983708a4 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#57 0x0000002a98370bae in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#58 0x0000002a98371095 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#59 0x0000002a975fa6f1 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#60 0x0000002a964c7810 in wxEventLoop::Run ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#61 0x0000002a9654d621 in wxAppBase::MainLoop ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#62 0x0000002a9654d726 in wxAppBase::OnRun ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#63 0x000000000041ca5d in CodeBlocksApp::OnRun (this=0x7e7160) at app.cpp:351
#64 0x0000002a96b72fea in wxEntry () from /usr/local/lib/libwx_base-2.6.so.0
#65 0x000000000041b012 in main (argc=1, argv=0x14075c0) at app.cpp:83
(gdb)


here it is WITH extra stability enabled (appears identical to the orignal poster's error now):

Quote

Program received signal SIGSEGV, Segmentation fault.
0x0000002a9660861a in wxGenericTreeCtrl::ItemHasChildren ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
(gdb) bt
#0  0x0000002a9660861a in wxGenericTreeCtrl::ItemHasChildren ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#1  0x0000002a957313c8 in DoRememberExpandedNodes (tree=0x9cdd20,
    parent=@0x7fbfffe9f8, nodePaths=@0x7fbfffea00, path=@0x7fbfffe9b0)
    at globals.cpp:179
#2  0x0000002a9573195a in SaveTreeState (tree=0x9cdd20, parent=@0x7fbfffe9f8,
    nodePaths=@0x7fbfffea00) at globals.cpp:246
#3  0x0000002a9a2e1055 in ClassBrowser::Update (this=0x9dd680) at parser.h:117
#4  0x0000002a9a2e0fed in ClassBrowser::SetParser (this=0x9cdd20,
    parser=0x7fbfffe940) at classbrowser.cpp:87
#5  0x0000002a9a2e861e in NativeParser::SetClassBrowserProject (this=0x859be0,
    project=0x7fbfffe940) at nativeparser.h:14
#6  0x0000002a9a2e54f3 in CodeCompletion::OnProjectActivated (this=0x9cdd20,
    event=@0x7fbfffec60) at sdk_events.h:29
#7  0x0000002a96b35b77 in wxAppConsole::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#8  0x0000002a96bc9a24 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/local/lib/libwx_base-2.6.so.0
#9  0x0000002a96bc8ef3 in wxEventHashTable::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#10 0x0000002a96bc9b99 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#11 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
   from /usr/local/lib/libwx_base-2.6.so.0
#12 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#13 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#14 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#15 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#16 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#17 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#18 0x0000002a95751564 in PluginManager::NotifyPlugins (this=0x7804b0,
    event=@0x7fbfffec60) at pluginmanager.cpp:429
#19 0x0000002a95761a0f in ProjectManager::SetProject (this=0x73aec0,
    project=0x7fbfffec60, refresh=true) at projectmanager.cpp:358
#20 0x0000002a95764264 in ProjectManager::CloseActiveProject (this=0x73aec0,
    dontsave=false) at projectmanager.h:22
#21 0x0000002a95763fed in ProjectManager::CloseAllProjects (this=0x73aec0,
    dontsave=false) at projectmanager.cpp:637
#22 0x0000002a95764d03 in ProjectManager::CloseWorkspace (this=0x73aec0)
    at projectmanager.cpp:904
---Type <return> to continue, or q <return> to quit---
#23 0x0000000000429a4f in MainFrame::DoCloseCurrentWorkspace (this=0x9cdd20)
    at main.cpp:940
#24 0x000000000042d2fa in MainFrame::OnApplicationClose (this=0xc04150,
    event=@0x7fbfffefc0) at main.cpp:1355
#25 0x0000002a96b35b77 in wxAppConsole::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#26 0x0000002a96bc9a24 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/local/lib/libwx_base-2.6.so.0
#27 0x0000002a96bc8ef3 in wxEventHashTable::HandleEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#28 0x0000002a96bc9b99 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#29 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#30 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#31 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#32 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#33 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#34 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
   from /usr/local/lib/libwx_base-2.6.so.0
#35 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#36 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#37 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#38 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#39 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#40 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#41 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#42 0x0000002a96bc9b32 in wxEvtHandler::ProcessEvent ()
   from /usr/local/lib/libwx_base-2.6.so.0
#43 0x0000002a965d32ec in wxWindowBase::Close ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#44 0x0000002a964d1330 in gtk_frame_delete_callback ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#45 0x0000002a975fd013 in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#46 0x0000002a98016056 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#47 0x0000002a980258ce in g_signal_emit_by_name ()
   from /usr/lib/libgobject-2.0.so.0
#48 0x0000002a98024713 in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#49 0x0000002a98024bd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#50 0x0000002a976cbda6 in gtk_widget_send_expose ()
   from /usr/lib/libgtk-x11-2.0.so.0
#51 0x0000002a975fac94 in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#52 0x0000002a9792db93 in _gdk_events_queue ()
   from /usr/lib/libgdk-x11-2.0.so.0
#53 0x0000002a9836f90c in g_main_depth () from /usr/lib/libglib-2.0.so.0
#54 0x0000002a983708a4 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#55 0x0000002a98370bae in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#56 0x0000002a98371095 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#57 0x0000002a975fa6f1 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#58 0x0000002a964c7810 in wxEventLoop::Run ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#59 0x0000002a9654d621 in wxAppBase::MainLoop ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#60 0x0000002a9654d726 in wxAppBase::OnRun ()
   from /usr/local/lib/libwx_gtk2_core-2.6.so.0
#61 0x000000000041ca5d in CodeBlocksApp::OnRun (this=0x9cdd20) at app.cpp:351
#62 0x0000002a96b72fea in wxEntry () from /usr/local/lib/libwx_base-2.6.so.0
#63 0x000000000041b012 in main (argc=1, argv=0x7fbfffe940) at app.cpp:83
(gdb)


its not 100% crash in either case (with, or without extra stability). it seems rather random. sometimes, works, sometimes doesn't... though there seems to be a more of a chance it happening with more projects open.

Hope that helps!


BTW, I'm running the latest CVS (as of this posting)
« Last Edit: October 02, 2005, 11:28:28 am by Joker »

Offline st3vie

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: LINUX: Crash when closing workspace
« Reply #7 on: October 13, 2005, 02:49:23 pm »
i've been away for a while :)

i haven't been able to really get to the bottom of this. As stated by joker, it is a bit random. One time it's with the first project i try to close, then it's with the 6th, the next time with the 3rd.

It's a strange one i guess. Maybe i'll have some more time again soon to try to dig alittle deeper.

-st3vie