I've got this crash in the CC:
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff761cdb6 in CompilerCommandGenerator::SetupLinkLibraries (this=0x8a139f0, compiler=0x21db200, target=0x87b0b90) at compilercommandgenerator.cpp:1037
#2 0x00007ffff7625a76 in CompilerCommandGenerator::Init (this=0x8a139f0, project=0x6a1f460) at compilercommandgenerator.cpp:164
#3 0x00007fffc6bd91fb in CompilerMINGW::GetCommandGenerator(cbProject*) () from /usr/lib/codeblocks/plugins/libcompiler.so
#4 0x00007fffbaf9a42a in NativeParser::AddCompilerDirs(cbProject*, ParserBase*) () from /usr/lib/codeblocks/plugins/libcodecompletion.so
#5 0x00007fffbaf9bc68 in NativeParser::AddProjectToParser(cbProject*) () from /usr/lib/codeblocks/plugins/libcodecompletion.so
#6 0x00007fffbaf9c6c6 in NativeParser::OnParsingOneByOneTimer(wxTimerEvent&) () from /usr/lib/codeblocks/plugins/libcodecompletion.so
#7 0x00007ffff518c0ef in wxAppConsoleBase::CallEventHandler (this=0x8f5c10, handler=0x209bf60, functor=..., event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/appbase.cpp:623
#8 0x00007ffff5332f70 in wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=<optimized out>, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1392
#9 0x00007ffff53333a8 in wxEvtHandler::SearchDynamicEventTable (this=0x209bf60, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1751
#10 0x00007ffff533342f in wxEvtHandler::TryHereOnly (this=0x209bf60, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1585
#11 0x00007ffff53334f3 in wxEvtHandler::TryBeforeAndHere (event=..., this=0x209bf60) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/include/wx/event.h:3671
#12 wxEvtHandler::ProcessEventLocally (this=0x209bf60, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1522
#13 0x00007ffff5333556 in wxEvtHandler::ProcessEvent (this=0x209bf60, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1495
#14 0x00007ffff53332bf in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/event.cpp:1613
#15 0x00007ffff528d409 in wxTimerImpl::SendEvent (this=0x209c600) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/common/timerimpl.cpp:51
#16 0x00007ffff5af34df in wxTimerImpl::Notify (this=0x209c600) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/include/wx/private/timer.h:47
#17 timeout_callback (data=0x209c600) at /var/tmp/portage/x11-libs/wxGTK-3.0.2.0-r2/work/wxPython-src-3.0.2.0/src/gtk/timer.cpp:38
#18 0x00007ffff3dc9c93 in ?? () from /usr/lib64/libglib-2.0.so.0
#19 0x0000000007262d10 in ?? ()
#20 0x0000000000000000 in ?? ()
(gdb) frame 1
#1 0x00007ffff761cdb6 in CompilerCommandGenerator::SetupLinkLibraries (this=0x8a139f0, compiler=0x21db200, target=0x87b0b90) at compilercommandgenerator.cpp:1037
1037 compilercommandgenerator.cpp: No such file or directory.
(gdb) p target
$1 = (ProjectBuildTarget *) 0x87b0b90
(gdb) p target->GetParentProject()
[Thread 0x7fff83fff700 (LWP 9361) exited]
$2 = (cbProject *) 0x0
(gdb) info threads
Id Target Id Frame
10 Thread 0x7fffba888700 (LWP 10609) "threaded-ml" 0x00007ffff43ac45d in poll () from /lib64/libc.so.6
8 Thread 0x7fffbaec2700 (LWP 10556) "codeblocks" 0x00007ffff4f0d00f in pthread_cond_wait () from /lib64/libpthread.so.0
5 Thread 0x7fffdb7fe700 (LWP 10496) "gmain" 0x00007ffff43ac45d in poll () from /lib64/libc.so.6
4 Thread 0x7fffdbfff700 (LWP 10495) "codeblocks" 0x00007ffff4f0d00f in pthread_cond_wait () from /lib64/libpthread.so.0
3 Thread 0x7fffe0ede700 (LWP 10494) "codeblocks" 0x00007ffff4f0d00f in pthread_cond_wait () from /lib64/libpthread.so.0
2 Thread 0x7fffe16df700 (LWP 10493) "codeblocks" 0x00007ffff4f0d00f in pthread_cond_wait () from /lib64/libpthread.so.0
* 1 Thread 0x7ffff7fa0940 (LWP 10482) "codeblocks" 0x0000000000000000 in ?? ()
Steps to reproduce:
I can easily workaround this, but I think that it should be fixed in a different way than adding a check for nullptr. Probably the CC should detect that the workspace is closing and stop parsing projects.
This kind of bug is that CC need to run a process to call the gcc command -E to get all the gcc buildin include search paths, but when the gcc command is running, and CC want to exit(the project get closed).
I am going to assume this has been fixed by now as I cannot reproduce the crash with SVN 12458 on Linux Mint 20.1 or SVN 12468 On Windows 10.
It is a timing/race bug. This means that not-reproducing it is not the same as the bug is fixed. I'm pretty sure this can still happen, because I've not seen any work done to fix it.