User forums > Using Code::Blocks
Linux crashes
thomas:
Mind trying something? There are a few Yields which are possibly not needed. Please try what happens if you just comment these out rigorously.
Certainly not needed (ProcessEvent is synchronous):
app.cpp, line 423
Very likely not needed:
app.cpp, line 566
Possibly not needed (seems to make no difference here):
main.cpp 684
Der Meister:
--- Quote from: thomas on January 13, 2006, 10:13:06 pm ---I stepped through MainFrame::OnFileCloseWorkspace from head to tail (on Windows, but nevertheless). There is not a single call to wxYield() anywhere near that part of code.
Other ideas?
--- End quote ---
Well, the backtrace says that 'ProjectManager::RemoveProjectFromAllDependencies' called 'MessageManager::DebugLog' and this one called 'Manager::Yield' and thus indirectly 'wxApp::Yield'. Should this behave different on Windows? Or did you use another revision? It seems as there were some changes in revision 1748 - maybe they solved the problem?
--- Quote from: thomas ---Mind trying something?
--- End quote ---
I'll do that but at the moment I'm compiling revision 1751 - I would not be surprised if the problem is gone since revision 1748.
mandrav:
I got news for this strange bug. It seems it only hangs if the project you 're closing has any open files :shock: . If it doesn't, it closes just fine. I 'm looking into it now...
Der Meister:
Got another nice backtrace:
--- Code: ---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)
--- End code ---
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.
rickg22:
EDIT: Der Meister, if the "Extra stability" tweak (in settings) is still present in your version of Code::Blocks, try enabling it.
Yiannis:
I've experienced this kind of crashes since the good ol' times, remember? MessageManager::*log is responsible for the yields. You told me once that you needed those yields because you didn't want to wait 1 second after saving files, and that part has just been fixed (it was a codecompletion issue) - so the yields aren't needed anymore.
Keeping those Yields is very much like having straw pipes for your house plumbery, and trying to find and fix all the leaks with duct tape. Remove the yields, and you'll remove the problem.
What do you think?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version