You'ren't the only one, but I'ven't spent much time with the Linux version.
Last crash I got was trying to close a project right clicking on it and selecting "close project". It "didn't work". I tried again with the same result. I tried to close Code::Blocks and it just died. I just cannot remember the last version that happened.
I think this is the same issue as the one I have now in revision 1746. And it seems that our good old friend wxApp::Yield is bothering is again. 8)
I had one project open and then hit "File->Close Workspace". The open editors are closed, but the project tree is not updated (i.e. it still shows the just closed project). Apart from this Code::Blocks seems to respond as normal execpt that it burns the full CPU-Power. I stopped it using ctr+c and got this backtrace:
Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 13923)]
0xb7814a7a in wxMenuBase::FindChildItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
(gdb) bt
#0 0xb7814a7a in wxMenuBase::FindChildItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#1 0xb77a2b4a in wxMenuBar::FindMenuItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#2 0xb77a2b8b in wxMenuBar::FindMenuItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#3 0xb77a2bb7 in wxMenuBar::FindItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#4 0xb7817f66 in wxMenuBarBase::Enable ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#5 0x08083a31 in MainFrame::OnSearchMenuUpdateUI (this=0x81c0a00,
event=@0xbfffdda0) at main.cpp:2607
#6 0xb74ed48b in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#7 0xb7591a3b in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#8 0xb7591da7 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#9 0xb7592a2e in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#10 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#11 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#12 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#13 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#14 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#15 0xb7846d3a in wxWindowBase::TryParent ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#16 0xb75929e3 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#17 0xb7839819 in wxToolBarBase::UpdateWindowUI ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#18 0xb77b7261 in wxToolBar::OnInternalIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#19 0xb77bff92 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#20 0xb77bffc2 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#21 0xb77bfed8 in wxAppBase::ProcessIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#22 0xb77173d1 in wxPaletteBase::GetColoursCount ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#23 0xb6ebb663 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#24 0xb6eb6b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#25 0xb6eb93dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#26 0xb6eb98fb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#27 0xb71127e2 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#28 0xb7717864 in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#29 0xb7e2cb4c in Manager::Yield () at app.h:297
#30 0xb7e2f919 in MessageManager::DebugLog (this=0x841fde0, msg=0x0)
at messagemanager.cpp:172
#31 0xb7e6ceaf in ProjectManager::RemoveProjectFromAllDependencies (
this=0x842f448, base=0x876d1c8) at string.h:477
#32 0xb7e724b7 in ProjectManager::CloseActiveProject (this=0x842f448,
dontsave=true) at projectmanager.cpp:788
#33 0xb7e7272b in ProjectManager::CloseAllProjects (this=0x842f448, dontsave=4)
at projectmanager.cpp:716
#34 0xb7e7283e in ProjectManager::CloseWorkspace (this=0x842f448)
at projectmanager.cpp:1003
#35 0x0807e7ee in MainFrame::OnFileCloseWorkspace (this=0x81c0a00,
event=@0xbfffe4a0) at main.cpp:1763
#36 0xb74ed48b in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#37 0xb7591a3b in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#38 0xb7591dd4 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#39 0xb7592a2e in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#40 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#41 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#42 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#43 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#44 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#45 0xb77a3116 in wxMenu::FindMenuIdByMenuItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#46 0xb6f4f16f in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#47 0xb6f3628f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#48 0xb6f4d813 in g_signal_has_handler_pending ()
from /usr/lib/libgobject-2.0.so.0
#49 0xb6f4e9c7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#50 0xb6f4ed8d in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#51 0xb720d923 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#52 0xb7124573 in gtk_menu_shell_activate_item ()
from /usr/lib/libgtk-x11-2.0.so.0
#53 0xb7124837 in gtk_menu_shell_activate_item ()
from /usr/lib/libgtk-x11-2.0.so.0
#54 0xb711b104 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#55 0xb711548a in gtk_marshal_VOID__UINT_STRING ()
from /usr/lib/libgtk-x11-2.0.so.0
#56 0xb6f366c5 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#57 0xb6f3628f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#58 0xb6f4d39a in g_signal_has_handler_pending ()
from /usr/lib/libgobject-2.0.so.0
#59 0xb6f4e5d7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#60 0xb6f4ed8d in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#61 0xb720da95 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#62 0xb7113a6e in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#63 0xb7113d41 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#64 0xb7339bff in gdk_event_get_graphics_expose ()
from /usr/lib/libgdk-x11-2.0.so.0
#65 0xb6eb6b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#66 0xb6eb93dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#67 0xb6eb9740 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#68 0xb71130cd in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#69 0xb77341b2 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#70 0xb77bfc05 in wxAppBase::MainLoop ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#71 0xb77bfd42 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#72 0x08060548 in CodeBlocksApp::OnRun (this=0x0) at app.cpp:471
#73 0xb75318be in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#74 0xb7531c1c in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#75 0x0805fcea in main (argc=1, argv=0x0) at app.cpp:86
As you can see 'MessageManager::DebugLog' is called from the functions that close the project. And 'MessageManager::DebugLog' calls Manager::Yield and thus wxApp::Yield. And this functions just sets up another message-loop that keeps Code::Blocks still alive.
After closing Code::BLocks it crashes in "ProjectManager::CloseActiveProject". That is quite logical because after the shutdown is complete and the "new" message loop returns, execution will come back to "ProjectManager::CloseActiveProject" which then crashes because everything around is already destroyed.
I'm just wondering why this did never happen before? Or did 'MessageManager::DebugLog' never call Manager::Yield (or wxApp::Yield) until the changes during the last week?
PS: I'm running Code::Blocks Version 1.0 revision 1746 (gcc 3.4.4 Linux/unicode, build: Jan 13 2006 15:05:25) with *NO* plugins enabled.
Got another nice backtrace:
Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 11492)]
0xb7707ee2 in wxCommandEvent::wxCommandEvent ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
(gdb) bt
#0 0xb7707ee2 in wxCommandEvent::wxCommandEvent ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#1 0xb78461d3 in wxWindowBase::UpdateWindowUI ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#2 0xb7748de6 in wxWindow::OnInternalIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#3 0xb77bff92 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#4 0xb77bffc2 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#5 0xb77bffc2 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#6 0xb77bfed8 in wxAppBase::ProcessIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#7 0xb77173d1 in wxPaletteBase::GetColoursCount ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#8 0xb6ebb663 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#9 0xb6eb6b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#10 0xb6eb93dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#11 0xb6eb98fb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#12 0xb71127e2 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7717864 in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#14 0xb7595554 in wxYieldIfNeeded () from /usr/lib/libwx_baseu-2.6.so.0
#15 0xb787cc9a in wxGenericTreeCtrl::ScrollTo ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#16 0xb787f8ed in wxGenericTreeCtrl::EnsureVisible ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#17 0xb787fb8e in wxGenericTreeCtrl::DoSelectItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#18 0xb787fe70 in wxGenericTreeCtrl::SelectItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#19 0xb787fef6 in wxGenericTreeCtrl::OnInternalIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#20 0xb77bff92 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#21 0xb77bffc2 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#22 0xb77bfed8 in wxAppBase::ProcessIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#23 0xb77173d1 in wxPaletteBase::GetColoursCount ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#24 0xb6ebb663 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#25 0xb6eb6b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#26 0xb6eb93dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#27 0xb6eb9740 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#28 0xb71130cd in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#29 0xb77958a4 in wxDialog::ShowModal () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#30 0xb7dab260 in AnnoyingDialog::ShowModal (this=0xb75bc19c)
at annoyingdialog.cpp:127
#31 0x08070dab in MainFrame::DoCheckCurrentLayoutForChanges (this=0x82218a8,
canCancel=false) at main.cpp:924
#32 0x080710a3 in MainFrame::SaveWindowState (this=0x82218a8) at main.cpp:843
#33 0x0807e81c in MainFrame::OnApplicationClose (this=0x82218a8,
event=@0xbfffe9c0) at main.cpp:1859
#34 0xb74ed48b in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#35 0xb7591a3b in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#36 0xb7591cf1 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#37 0xb7592a2e in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#38 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#39 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#40 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#41 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#42 0xb75929ce in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#43 0xb7842046 in wxWindowBase::Close () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#44 0xb773e357 in wxTopLevelWindowGTK::Init ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#45 0xb711548a in gtk_marshal_VOID__UINT_STRING ()
from /usr/lib/libgtk-x11-2.0.so.0
#46 0xb6f3628f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#47 0xb6f4d813 in g_signal_has_handler_pending ()
from /usr/lib/libgobject-2.0.so.0
#48 0xb6f4e5d7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#49 0xb6f4ed8d in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#50 0xb720da95 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#51 0xb7113fec in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#52 0xb7339bff in gdk_event_get_graphics_expose ()
from /usr/lib/libgdk-x11-2.0.so.0
#53 0xb6eb6b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#54 0xb6eb93dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#55 0xb6eb9740 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#56 0xb71130cd in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#57 0xb77341b2 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#58 0xb77bfc05 in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#59 0xb77bfd42 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#60 0x08060768 in CodeBlocksApp::OnRun (this=0xb75bc19c) at app.cpp:471
#61 0xb75318be in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#62 0xb7531c1c in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#63 0x0805ff0a in main (argc=1, argv=0xb75bc19c) at app.cpp:86
(gdb)
I just opened a project (from the recently used projects thus it opened a few files, too) and then closed Code::Blocks. It closes the project and then asks me if I want to save my changes to the layout - but I never changed anything. After clicking OK or Cancel (It doesn't matter - both lead to the same result) Code::Blocks hangs and bruns all CPU-Power. After stopping it with ctr+c I got the backtrace postet above.
PS: This happend in revision 1751 - but the old problem still exists, too.
Edit: Now Code::Blocks only demands me to save the layout if I did really change it - no idea why this behaviour changed, but seems to be correct. If it does not ask me Code::Blocks closes just fine. But if I change something to make Code::Blocks ask me I can reproduce this problem.
And: I applied the changes thomas suggested - but it seems as they don't change anything.
Here is my build tag: Version 1.0 revision 1747 (gcc 4.0.2 Linux/unicode, build: Jan 13 2006 09:51:31)
When Icodecompeletion is completely disabled (ie plugin is never loaded) I am able to open and close projects fine as long as there are not any files open. I can also shutdown codeblocks fine.
When I have codecompletion loaded and enabled (no cache) and I try to close Code::Blocks after closeing all open files it hangs a full CPU usage. That is the first backtrace. The second backtrace shows what happens when codecompletion is loaded but disabled (through the menu options) we still have a CPU hang on close after the exact same conditions, it is basically the exact same backtrace.
Program received signal SIGINT, Interrupt.
[Switching to Thread -1228502240 (LWP 30556)]
0xb7a10b1e in wxMenuBase::FindChildItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
(gdb) bt
#0 0xb7a10b1e in wxMenuBase::FindChildItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#1 0xb79ae678 in wxMenu::DoRemove () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#2 0xb79ae715 in wxMenuBar::FindItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#3 0xb7a10582 in wxMenuBarBase::Enable ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#4 0xb665ae54 in CompilerGCC::OnUpdateUI (this=0x9196c50, event=@0x84acd78)
at compilergcc.cpp:2350
#5 0xb772c2c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#6 0xb77b4edf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#7 0xb77b50b0 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#8 0xb77b5261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#9 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#10 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#11 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#12 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#13 0xb7a37024 in wxWindowBase::TryParent ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#14 0xb77b5217 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#15 0xb7a2e5d9 in wxToolBarBase::UpdateWindowUI ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#16 0xb79c24e7 in wxToolBar::OnInternalIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#17 0xb79caf26 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#18 0xb79caf5a in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#19 0xb79cb2ad in wxAppBase::ProcessIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#20 0xb79224d9 in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#21 0xb6d9d750 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#22 0xb6d9b4ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0xb6d9e4f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#24 0xb6d9e9d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0xb71626a8 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb79221fd in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#27 0xb77b73b1 in wxYield () from /usr/lib/libwx_baseu-2.6.so.0
#28 0xb791abd5 in wxSafeYield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#29 0xb67305e1 in Parser::Clear (this=0x86e0430) at parser/parser.cpp:501
#30 0xb67306f1 in ~Parser (this=0x86e0430) at parser/parser.cpp:133
#31 0xb672b0a4 in NativeParser::RemoveParser (this=0x854c950,
project=0x8896c30, useCache=true) at nativeparser.cpp:324
#32 0xb671de8d in CodeCompletion::OnProjectClosed (this=0x854c8e0,
event=@0xbfbe028c) at codecompletion.cpp:608
#33 0xb772c2c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#34 0xb77b4edf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#35 0xb77b50b0 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#36 0xb77b5261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#37 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#38 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#39 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#40 0xb77b5207 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/libwx_baseu-2.6.so.0
#41 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#42 0xb7e2ba74 in PluginManager::NotifyPlugins (this=0x8385b28,
event=@0xbfbe028c) at pluginmanager.cpp:528
#43 0xb7d8d45f in cbProject::NotifyPlugins (this=0x84acd78, type=10277)
at cbproject.cpp:116
#44 0xb7d8dd02 in ~cbProject (this=0x8896c30) at cbproject.cpp:108
#45 0xb7e5044a in ProjectManager::CloseActiveProject (this=0x8514aa8,
dontsave=true) at projectmanager.cpp:786
#46 0xb7e50505 in ProjectManager::CloseAllProjects (this=0x8514aa8,
dontsave=false) at projectmanager.cpp:716
#47 0xb7e50685 in ProjectManager::CloseWorkspace (this=0x8514aa8)
at projectmanager.cpp:997
#48 0x0807043a in MainFrame::DoCloseCurrentWorkspace (this=0x8a7f8c0)
at main.cpp:1146
#49 0x08087c5f in MainFrame::OnApplicationClose (this=0x8a7f8c0,
event=@0xbfbe0664) at main.cpp:1852
#50 0xb772c2c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#51 0xb77b4edf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#52 0xb77b50b0 in wxEventHashTable::HandleEvent ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/libwx_baseu-2.6.so.0
#53 0xb77b5261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#54 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#55 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#56 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#57 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#58 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#59 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#60 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#61 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#62 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#63 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#64 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#65 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#66 0xb77b5207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#67 0xb7a3abab in wxWindowBase::Close ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#68 0xb7944bab in wxTopLevelWindowGTK::IsActive ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#69 0xb716502c in _gtk_marshal_BOOLEAN__BOXED ()
from /usr/lib/libgtk-x11-2.0.so.0
#70 0xb6e093a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#71 0xb6e17b13 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#72 0xb6e18ec3 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#73 0xb6e194c3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#74 0xb724716f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#75 0xb7163d24 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#76 0xb736db2d in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#77 0xb6d9b4ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#78 0xb6d9e4f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#79 0xb6d9e7e3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#80 0xb7162e65 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#81 0xb793b2a7 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#82 0xb79cab6a in wxAppBase::MainLoop ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#83 0xb79cac4f in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#84 0x080611ce in CodeBlocksApp::OnRun (this=0x8112338) at app.cpp:471
#85 0xb775fad4 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#86 0xb775fb88 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#87 0x0805fc44 in main (argc=1, argv=0xbfbe0ec4) at app.cpp:86
Second:
Program received signal SIGINT, Interrupt.
[Switching to Thread -1228653792 (LWP 30757)]
0xb798964c in wxMenu::DoRemove () from /usr/lib/libwx_gtk2u_core-2.6.so.0
(gdb) bt
#0 0xb798964c in wxMenu::DoRemove () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#1 0xb7989715 in wxMenuBar::FindItem ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#2 0xb79eb582 in wxMenuBarBase::Enable ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#3 0x080785a4 in MainFrame::OnEditMenuUpdateUI (this=0x8a6f030,
event=@0xbfeb92d4) at main.cpp:2531
#4 0xb77072c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#5 0xb778fedf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#6 0xb77900b0 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#7 0xb7790261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#8 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#9 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#10 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#11 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#12 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#13 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#14 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#15 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#16 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#17 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#18 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#19 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#20 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#21 0xb7a12024 in wxWindowBase::TryParent ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#22 0xb7790217 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#23 0xb7a095d9 in wxToolBarBase::UpdateWindowUI ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#24 0xb799d4e7 in wxToolBar::OnInternalIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#25 0xb79a5f26 in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#26 0xb79a5f5a in wxAppBase::SendIdleEvents ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#27 0xb79a62ad in wxAppBase::ProcessIdle ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#28 0xb78fd4d9 in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#29 0xb6d78750 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#30 0xb6d764ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0xb6d794f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#32 0xb6d799d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0xb713d6a8 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#34 0xb78fd1fd in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#35 0xb77923b1 in wxYield () from /usr/lib/libwx_baseu-2.6.so.0
#36 0xb78f5bd5 in wxSafeYield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#37 0xb670b5e1 in Parser::Clear (this=0x87ae500) at parser/parser.cpp:501
#38 0xb670b6f1 in ~Parser (this=0x87ae500) at parser/parser.cpp:133
#39 0xb67060a4 in NativeParser::RemoveParser (this=0x91313f8,
project=0x88339f0, useCache=true) at nativeparser.cpp:324
#40 0xb66f8e8d in CodeCompletion::OnProjectClosed (this=0x9131388,
---Type <return> to continue, or q <return> to quit---
event=@0xbfeb985c) at codecompletion.cpp:608
#41 0xb77072c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#42 0xb778fedf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#43 0xb77900b0 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#44 0xb7790261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#45 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#46 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#47 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#48 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#49 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#50 0xb7e06a74 in PluginManager::NotifyPlugins (this=0x849faa0,
event=@0xbfeb985c) at pluginmanager.cpp:528
#51 0xb7d6845f in cbProject::NotifyPlugins (this=0x84fe5a8, type=10277)
at cbproject.cpp:116
---Type <return> to continue, or q <return> to quit---
#52 0xb7d68d02 in ~cbProject (this=0x88339f0) at cbproject.cpp:108
#53 0xb7e2b44a in ProjectManager::CloseActiveProject (this=0x84a3ca0,
dontsave=true) at projectmanager.cpp:786
#54 0xb7e2b505 in ProjectManager::CloseAllProjects (this=0x84a3ca0,
dontsave=false) at projectmanager.cpp:716
#55 0xb7e2b685 in ProjectManager::CloseWorkspace (this=0x84a3ca0)
at projectmanager.cpp:997
#56 0x0807043a in MainFrame::DoCloseCurrentWorkspace (this=0x8a6f030)
at main.cpp:1146
#57 0x08087c5f in MainFrame::OnApplicationClose (this=0x8a6f030,
event=@0xbfeb9c34) at main.cpp:1852
#58 0xb77072c1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#59 0xb778fedf in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.6.so.0
#60 0xb77900b0 in wxEventHashTable::HandleEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#61 0xb7790261 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#62 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#63 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#64 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#65 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#66 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#67 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#68 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#69 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#70 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#71 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#72 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#73 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#74 0xb7790207 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.6.so.0
#75 0xb7a15bab in wxWindowBase::Close ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#76 0xb791fbab in wxTopLevelWindowGTK::IsActive ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#77 0xb714002c in _gtk_marshal_BOOLEAN__BOXED ()
from /usr/lib/libgtk-x11-2.0.so.0
#78 0xb6de43a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#79 0xb6df2b13 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#80 0xb6df3ec3 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#81 0xb6df44c3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#82 0xb722216f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#83 0xb713ed24 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#84 0xb7348b2d in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#85 0xb6d764ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#86 0xb6d794f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#87 0xb6d797e3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#88 0xb713de65 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#89 0xb79162a7 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#90 0xb79a5b6a in wxAppBase::MainLoop ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#91 0xb79a5c4f in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#92 0x080611ce in CodeBlocksApp::OnRun (this=0x8112338) at app.cpp:471
#93 0xb773aad4 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#94 0xb773ab88 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#95 0x0805fc44 in main (argc=1, argv=0xbfeba494) at app.cpp:86
If finally found the reason for the lock-up if Code::Blocks wants to save a modified Layout during shutdown (I described it here (http://forums.codeblocks.org/index.php?topic=1954.msg15418#msg15418)) and probably a solution for this.
The problem is that the 'Edit' menu (and probably other menus) is re-created when the annoying dialog should get closed (or even before? I don't know, doesn't matter anyway). Although the function 'MainFrame::OnEditMenuUpdateUI' (and probably the handlers for the other menus, too) checks if Code::Blocks is shutting down (and does nothing if this is true) it does not help here because 'Manager::appShuttingDown' is still false here. If I set it to true just before 'MainFrame::SaveWindowState' is called from 'MainFrame::OnApplicationClose' (this is line 1869 in 'src/src/main.cpp') everything works perfect.
Here is the little hack I used to test this:
$ svn diff src/src/main.cpp Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp (revision 1823)
+++ src/src/main.cpp (working copy)
@@ -1866,7 +1866,9 @@
return;
}
- SaveWindowState();
+ Manager::appShuttingDown = true;
+ SaveWindowState();
+ Manager::appShuttingDown = false;
m_LayoutManager.DetachPane(Manager::Get()->GetProjectManager()->GetNotebook());
m_LayoutManager.DetachPane(Manager::Get()->GetMessageManager()->GetNotebook());
Of course, this is no real solution because I had to make 'Manager::appShuttingDown' public to get this hack working ( :wink: ) but this was the easiest way to test this. And I don't really know how this should be integrated into the currect interface/etc. without being a dirty hack.
If it's a matter of events, why not just disable the main Window and prevent the events from getting triggered in the first place?
Did you mean 'wxWindow::Disable()'? This doesn't work. It just prevents the user from triggering new events but the UpdateUI-Events are still generated.
Anyway, I just found another solution that seems to be rather good (*no* hack ;) ) and it doesn't require big changes. 'MainFrame::OnApplicationClose' already sets a variable called 'MainFrame::m_InitiatedShutdown' to true to indicate that Code::Blocks will shut down. Just check this variable in addition to 'Manager::isappShuttingDown' and it works:
$ svn diff src/src/main.cpp
Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp (revision 1823)
+++ src/src/main.cpp (working copy)
@@ -2462,7 +2462,7 @@
void MainFrame::OnFileMenuUpdateUI(wxUpdateUIEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2500,7 +2500,7 @@
void MainFrame::OnEditMenuUpdateUI(wxUpdateUIEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2566,7 +2566,7 @@
void MainFrame::OnViewMenuUpdateUI(wxUpdateUIEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2607,7 +2607,7 @@
void MainFrame::OnSearchMenuUpdateUI(wxUpdateUIEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2632,7 +2632,7 @@
void MainFrame::OnProjectMenuUpdateUI(wxUpdateUIEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2653,7 +2653,7 @@
void MainFrame::OnEditorUpdateUI(CodeBlocksEvent& event)
{
- if(Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
{
event.Skip();
return;
@@ -2898,7 +2898,7 @@
void MainFrame::OnRequestDockWindow(CodeBlocksDockEvent& event)
{
- if (Manager::isappShuttingDown())
+ if(Manager::isappShuttingDown() || m_InitiatedShutdown)
return;
wxPaneInfo info;
I'm not sure if the change in 'MainFrame::OnRequestDockWindow' is necessary but it should not harm anything.
This patch was not for any crash.
It fixes the lock-up when Code::Blocks asks if the changed layout should be saved while Code::Blocks is shutting down.
The crash you are talking about is another problem with wxYield. I can reproduce this here, too, and I'm quite sure that it is a plugin-related issue. Here is the backtrace I got when I stopped Code::Blocks after closing the project:
#0 0xb74e5a3c in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.6.so.0
#1 0xb758ddd4 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.6.so.0
#2 0xb758ea2e in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#3 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#4 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#5 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#6 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#7 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#8 0xb7842d3a in wxWindowBase::TryParent () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#9 0xb758e9e3 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#10 0xb7842d3a in wxWindowBase::TryParent () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#11 0xb758e9e3 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#12 0xb7842210 in wxWindowBase::UpdateWindowUI () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#13 0xb7744de6 in wxWindow::OnInternalIdle () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#14 0xb787be98 in wxGenericTreeCtrl::OnInternalIdle () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#15 0xb77bbf92 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#16 0xb77bbfc2 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#17 0xb77bbfc2 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#18 0xb77bbed8 in wxAppBase::ProcessIdle () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#19 0xb77133d1 in wxPaletteBase::GetColoursCount () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#20 0xb6eb7663 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#21 0xb6eb2b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#22 0xb6eb53dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#23 0xb6eb58fb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0xb710e7e2 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#25 0xb7713864 in wxApp::Yield () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#26 0xb7591554 in wxYieldIfNeeded () from /usr/lib/libwx_baseu-2.6.so.0
#27 0xb7878c9a in wxGenericTreeCtrl::ScrollTo () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#28 0xb787b8ed in wxGenericTreeCtrl::EnsureVisible () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#29 0xb787bb8e in wxGenericTreeCtrl::DoSelectItem () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#30 0xb787be70 in wxGenericTreeCtrl::SelectItem () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#31 0xb787bef6 in wxGenericTreeCtrl::OnInternalIdle () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#32 0xb77bbf92 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#33 0xb77bbfc2 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#34 0xb77bbed8 in wxAppBase::ProcessIdle () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#35 0xb771fbb6 in wxBeginBusyCursor () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#36 0xb7a126a3 in wxHtmlWindow::LoadPage () from /usr/lib/libwx_gtk2u_html-2.6.so.0
#37 0x0808af15 in StartHerePage (this=0x8b24368, owner=0x89dbc18, parent=0x89dbc18) at startherepage.cpp:75
#38 0x08076c7c in MainFrame::ShowHideStartPage (this=0x81b8128, forceHasProject=24) at editormanager.h:48
#39 0x080848a8 in MainFrame::OnProjectClosed (this=0x81b8128, event=@0x89dbc18) at main.cpp:2881
#40 0xb74e948b in wxAppConsole::HandleEvent () from /usr/lib/libwx_baseu-2.6.so.0
#41 0xb758da3b in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.6.so.0
#42 0xb758dcf1 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.6.so.0
#43 0xb758ea2e in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#44 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#45 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#46 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#47 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#48 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#49 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#50 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#51 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#52 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#53 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#54 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#55 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#56 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#57 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#58 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#59 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#60 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#61 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#62 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#63 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#64 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#65 0xb7e3c38a in PluginManager::NotifyPlugins (this=0x8808370, event=@0xbfffdff0) at pluginmanager.cpp:528
#66 0xb7dad800 in cbProject::NotifyPlugins (this=0x89dbc18, type=144555032) at cbproject.cpp:116
#67 0xb7dad8d6 in ~cbProject (this=0x8a20d80) at cbproject.cpp:108
#68 0xb7e5983a in ProjectManager::CloseProject (this=0x84327c0, project=0x8a20d80, dontsave=128, refresh=false) at projectmanager.cpp:790
#69 0xb7e5993a in ProjectManager::CloseAllProjects (this=0x84327c0, dontsave=128) at projectmanager.h:25
#70 0xb7e59a4e in ProjectManager::CloseWorkspace (this=0x84327c0) at projectmanager.cpp:1012
#71 0x0807e1ee in MainFrame::OnFileCloseWorkspace (this=0x81b8128, event=@0xbfffe4a0) at main.cpp:1769
#72 0xb74e948b in wxAppConsole::HandleEvent () from /usr/lib/libwx_baseu-2.6.so.0
#73 0xb758da3b in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.6.so.0
#74 0xb758ddd4 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.6.so.0
#75 0xb758ea2e in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#76 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#77 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#78 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#79 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#80 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#81 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#82 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#83 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#84 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#85 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#86 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#87 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#88 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#89 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#90 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#91 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#92 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#93 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#94 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#95 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#96 0xb758e9ce in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.6.so.0
#97 0xb779f116 in wxMenu::FindMenuIdByMenuItem () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#98 0xb6f4b16f in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#99 0xb6f3228f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#100 0xb6f49813 in g_signal_has_handler_pending () from /usr/lib/libgobject-2.0.so.0
#101 0xb6f4a9c7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#102 0xb6f4ad8d in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#103 0xb7209923 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#104 0xb7120573 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#105 0xb7120837 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#106 0xb7117104 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#107 0xb711148a in gtk_marshal_VOID__UINT_STRING () from /usr/lib/libgtk-x11-2.0.so.0
#108 0xb6f326c5 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#109 0xb6f3228f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#110 0xb6f4939a in g_signal_has_handler_pending () from /usr/lib/libgobject-2.0.so.0
#111 0xb6f4a5d7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#112 0xb6f4ad8d in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#113 0xb7209a95 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#114 0xb710fa6e in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#115 0xb710fd41 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#116 0xb7335bff in gdk_event_get_graphics_expose () from /usr/lib/libgdk-x11-2.0.so.0
#117 0xb6eb2b5d in g_source_remove_poll () from /usr/lib/libglib-2.0.so.0
#118 0xb6eb53dc in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#119 0xb6eb5740 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#120 0xb710f0cd in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#121 0xb77301b2 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#122 0xb77bbc05 in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#123 0xb77bbd42 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#124 0x080607f8 in CodeBlocksApp::OnRun (this=0x89dbc18) at app.cpp:471
#125 0xb752d8be in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#126 0xb752dc1c in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#127 0x0805ff9a in main (argc=1, argv=0x89dbc18) at app.cpp:86
Yet I don't know which plugin causes the problem but I will check it.