Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Crash with batch build on linux
BlueHazzard:
Hi, i use the command line on my headless server to build codeblocks projects...
I can not reproduce this 100% but it occurs 1 in 6 times: I get a crash "call of pure virtual function" on the finish of a compilation.
This is the backtrace:
--- Code: ---#0 0x00007ffff41dee97 in raise () at /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff41e0801 in abort () at /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff4bd3957 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff4bd9ab6 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff4bd9af1 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff4bda8bf in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff5bf2e29 in wxTextEntryBase::DoSetValue(wxString const&, int) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#7 0x00007ffff5acd507 in () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#8 0x00007ffff76b2a2b in TextCtrlLogger::Clear() (this=0x555556356c40) at loggers.cpp:165
#9 0x00007fffe91d91f1 in CompilerGCC::ClearLog(bool) (this=0x555555fcc0f0, switchToLog=false) at compilergcc.cpp:1079
#10 0x00007fffe91e840b in CompilerGCC::OnWorkspaceClosed(CodeBlocksEvent&) (this=0x555555fcc0f0, event=...) at compilergcc.cpp:3437
#11 0x00007fffe91f9411 in cbEventFunctor<CompilerGCC, CodeBlocksEvent>::Call(CodeBlocksEvent&) (this=0x555556533590, event=...) at ../../../src/include/cbfunctor.h:49
#12 0x00007ffff76c3e9a in Manager::ProcessEvent(CodeBlocksEvent&) (this=0x555555b26ba0, event=...) at manager.cpp:263
#13 0x00007ffff76e262b in PluginManager::NotifyPlugins(CodeBlocksEvent&) (this=0x555555f17700, event=...) at pluginmanager.cpp:1522
#14 0x00007ffff770e88f in ProjectManager::CloseWorkspace() (this=0x555555d8f900) at projectmanager.cpp:620
#15 0x00005555556807a7 in MainFrame::DoCloseCurrentWorkspace() (this=0x555555bdb710) at main.cpp:2049
#16 0x0000555555687529 in MainFrame::OnApplicationClose(wxCloseEvent&) (this=0x555555bdb710, event=...) at main.cpp:2929
#17 0x00007ffff52d24be in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#18 0x00007ffff52d25c3 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#19 0x00007ffff52d298b in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#20 0x00007ffff52d2783 in wxEvtHandler::DoTryChain(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#21 0x00007ffff52d2a75 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#22 0x00007ffff52d27d7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#23 0x00007ffff5c039d7 in wxWindowBase::Close(bool) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#24 0x0000555555605c25 in CodeBlocksApp::OnInit() (this=0x555555a675c0) at app.cpp:759
#25 0x000055555560d5d9 in wxAppConsoleBase::CallOnInit() (this=0x555555a675c0) at /usr/include/wx-3.0/wx/app.h:93
#26 0x00007ffff51e0b3a in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#27 0x0000555555603bcb in main(int, char**) (argc=5, argv=0x7fffffffe428) at app.cpp:338
--- End code ---
Any ideas how to debug this?
oBFusCATed:
Run cb from cb and debug it with gdb. Just edit the program arguments and/or work folder.
Most probably the text logger is already deleted when clear is called.
BlueHazzard:
Wasn't there a ticket or a forum post about the log panel with a fix lately?
I can not find it anymore...
Miguel Gimenez:
Ticket 738:
https://sourceforge.net/p/codeblocks/tickets/738/
I added a check about batch building before clearing the log, but it wasn't accepted.
oBFusCATed:
@Miguel: If you look at the backtrace you'll see that this for the clear call is not nullptr, so your fix would probably be unhelpful in this case.
Navigation
[0] Message Index
[#] Next page
Go to full version