Jens: Is there any chance that you are using gtk+ 3.6.
For me it is almost impossible to rebuild cb's workspace at the moment.
(gdb) thread apply all bt
Thread 7 (Thread 0x7fc561d04700 (LWP 14207)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc56f3da87e in ?? ()
#4 0x0000000000f5d701 in ?? ()
#5 0x0000000000f5dd28 in ?? ()
#6 0x00000001df148a98 in ?? ()
#7 0x00007fc54ad69fd0 in ?? ()
#8 0x00000000007894a0 in ?? ()
#9 0x00007fc56fa7e991 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib64/libwx_baseu-2.8.so.0
#10 0x00007fc56afab344 in ?? () from /usr/lib64/libGL.so.1
#11 0x00007fc56e328d96 in start_thread () from /lib64/libpthread.so.0
#12 0x00007fc56e06246d in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x7fc561503700 (LWP 14208)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc56f3da87e in ?? ()
#4 0x0000000000000001 in ?? ()
#5 0x0000000000f5dd60 in ?? ()
#6 0x0000000000f5eb60 in ?? ()
#7 0x00007fc56fa7d9d9 in wxMutexInternal::Unlock() () from /usr/lib64/libwx_baseu-2.8.so.0
#8 0x00007fc56fa7e991 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib64/libwx_baseu-2.8.so.0
#9 0x00007fc56afab344 in ?? () from /usr/lib64/libGL.so.1
#10 0x00007fc56e328d96 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fc56e06246d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7fc560d02700 (LWP 14209)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc56f3da87e in ?? ()
#4 0x0000000000000001 in ?? ()
#5 0x0000000000f5dd98 in ?? ()
#6 0x0000000000f5f500 in ?? ()
#7 0x00007fc56fa7d9d9 in wxMutexInternal::Unlock() () from /usr/lib64/libwx_baseu-2.8.so.0
#8 0x00007fc56fa7e991 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib64/libwx_baseu-2.8.so.0
#9 0x00007fc56afab344 in ?? () from /usr/lib64/libGL.so.1
#10 0x00007fc56e328d96 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fc56e06246d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7fc560501700 (LWP 14210)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc56f3da87e in ?? ()
#4 0x0000000000000001 in ?? ()
#5 0x0000000000f5ddd0 in ?? ()
#6 0x0000000000f5fc80 in ?? ()
#7 0x00007fc56fa7d9d9 in wxMutexInternal::Unlock() () from /usr/lib64/libwx_baseu-2.8.so.0
#8 0x00007fc56fa7e991 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib64/libwx_baseu-2.8.so.0
#9 0x00007fc56afab344 in ?? () from /usr/lib64/libGL.so.1
#10 0x00007fc56e328d96 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fc56e06246d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7fc552c29700 (LWP 14236)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc552d509e0 in ClassBrowserBuilderThread::Entry (this=0x1bd8210) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/classbrowserbuilderthread.cpp:191
#4 0x00007fc56fa7e991 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib64/libwx_baseu-2.8.so.0
#5 0x00007fc56afab344 in ?? () from /usr/lib64/libGL.so.1
#6 0x00007fc56e328d96 in start_thread () from /lib64/libpthread.so.0
#7 0x00007fc56e06246d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7fc55c23d700 (LWP 14237)):
#0 0x00007fc56e32d59c in pthread_cond_wait () from /lib64/libpthread.so.0
#1 0x00007fc56fa7d893 in wxConditionInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#2 0x00007fc56fa7dda0 in wxSemaphoreInternal::Wait() () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007fc56f35be27 in ?? ()
#4 0x000000000267a600 in ?? ()
#5 0x0000000001c8d501 in ?? ()
#6 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7fc573842940 (LWP 14186)):
#0 0x00007fc56e06efae in __lll_lock_wait_private () from /lib64/libc.so.6
#1 0x00007fc56dff8ed9 in _L_lock_7748 () from /lib64/libc.so.6
#2 0x00007fc56dff7c5d in calloc () from /lib64/libc.so.6
#3 0x00007fc56815efc2 in ?? () from /usr/lib64/libnvidia-tls.so.310.19
#4 0x00007fc56fa48ff4 in wxStringBase::AllocBuffer(unsigned long) () from /usr/lib64/libwx_baseu-2.8.so.0
#5 0x00007fc56fa491bd in wxStringBase::AllocBeforeWrite(unsigned long) () from /usr/lib64/libwx_baseu-2.8.so.0
#6 0x00007fc56fa49fe6 in wxStringBase::AssignCopy(unsigned long, wchar_t const*) () from /usr/lib64/libwx_baseu-2.8.so.0
#7 0x00007fc56fa4a0eb in wxStringBase::operator=(wchar_t) () from /usr/lib64/libwx_baseu-2.8.so.0
#8 0x00007fc56fa1fcb8 in wxFileName::GetPathSeparators(wxPathFormat) () from /usr/lib64/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#9 0x00007fc56fa1fe0a in wxFileName::GetPathTerminators(wxPathFormat) () from /usr/lib64/libwx_baseu-2.8.so.0
#10 0x00007fc56fa21436 in wxFileName::SplitPath(wxString const&, wxString*, wxString*, wxString*, wxString*, bool*, wxPathFormat) () from /usr/lib64/libwx_baseu-2.8.so.0
#11 0x00007fc56fa233ba in wxFileName::SplitPath(wxString const&, wxString*, wxString*, wxString*, wxPathFormat) () from /usr/lib64/libwx_baseu-2.8.so.0
#12 0x00007fc56fa23531 in ?? () from /usr/lib64/libwx_baseu-2.8.so.0
#13 0x00007fc56fa23a6a in ?? () from /usr/lib64/libwx_baseu-2.8.so.0
#14 0x00007fc570ac5686 in wxDebugReport::wxDebugReport() () from /usr/lib64/libwx_gtk2u_qa-2.8.so.0
#15 0x0000000000455f19 in CodeBlocksApp::OnFatalException (this=0x7c3a40) at /home/obfuscated/projects/codeblocks/git/src/src/app.cpp:819
#16 0x00007fc56fa832ec in wxFatalSignalHandler () from /usr/lib64/libwx_baseu-2.8.so.0
#17 <signal handler called>
#18 0x00007fc56dff20a3 in malloc_consolidate () from /lib64/libc.so.6
#19 0x00007fc56dff3cc4 in _int_malloc () from /lib64/libc.so.6
#20 0x00007fc56dff6b84 in malloc () from /lib64/libc.so.6
#21 0x00007fc56e02c059 in __alloc_dir () from /lib64/libc.so.6
#22 0x00007fc56afa82da in ?? () from /usr/lib64/libGL.so.1
#23 0x00007fc56afa8a43 in ?? () from /usr/lib64/libGL.so.1
#24 0x00007fc56afa8d0c in ?? () from /usr/lib64/libGL.so.1
#25 0x00007fc56afa8d6a in ?? () from /usr/lib64/libGL.so.1
#26 0x00007fc56af8486a in ?? () from /usr/lib64/libGL.so.1
#27 0x00007fc57364fafb in _dl_fini () from /lib64/ld-linux-x86-64.so.2
#28 0x00007fc56dfaf441 in __run_exit_handlers () from /lib64/libc.so.6
#29 0x00007fc56dfaf495 in exit () from /lib64/libc.so.6
#30 0x00007fc572db4861 in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#31 0x00007fc56da7a9d5 in _XError () from /usr/lib64/libX11.so.6
#32 0x00007fc56da77dd7 in ?? () from /usr/lib64/libX11.so.6
#33 0x00007fc56da77e25 in ?? () from /usr/lib64/libX11.so.6
#34 0x00007fc56da78465 in _XEventsQueued () from /usr/lib64/libX11.so.6
#35 0x00007fc56da6961d in XPending () from /usr/lib64/libX11.so.6
#36 0x00007fc572daa6b6 in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#37 0x00007fc57121d525 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#38 0x00007fc57121dbf3 in ?? () from /usr/lib64/libglib-2.0.so.0
#39 0x00007fc57121e11a in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#40 0x00007fc57313e927 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#41 0x00007fc57010c528 in wxEventLoop::Run() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#42 0x00007fc57017fa5b in wxAppBase::MainLoop() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#43 0x0000000000455cac in CodeBlocksApp::OnRun (this=0x7c3a40) at /home/obfuscated/projects/codeblocks/git/src/src/app.cpp:787
#44 0x00007fc56fa2dcda in wxEntry(int&, wchar_t**) () from /usr/lib64/libwx_baseu-2.8.so.0
#45 0x0000000000453279 in main (argc=8, argv=0x7fffdf149de8) at /home/obfuscated/projects/codeblocks/git/src/src/app.cpp:266
Yes.
Hm, have you modified the project to run cb in a terminal?
I only did it in debug-mode and this works (most of the time) if the ExpandBackticks stuff does not kick in.
But in normal mode it hangs reliably if it tries to build the first target.
With console output enabled it also works.
There are several errors shown before the project is loaded:
execvp(-version) failed with error 2!
execvp(-version) failed with error 2!
(codeblocks:22219): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'
(codeblocks:22219): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
(codeblocks:22219): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'
(codeblocks:22219): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
after (or while) loading the project the following errors are shown:
(codeblocks:22219): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'
(codeblocks:22219): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
** (codeblocks:22219): CRITICAL **: murrine_style_draw_flat_box: assertion `width >= -1' failed
** (codeblocks:22219): CRITICAL **: murrine_style_draw_flat_box: assertion `width >= -1' failed
The radio-errors/warnings are there for a long time (debugger-menu), the last two assertions are caused by wxExecute as far as I know and are also old.
The first two (execvp) messages are new as far as I can tell.
I will try to dig into it deeper (maybe Null-compiler ?).
But in normal mode it hangs reliably if it tries to build the first target.
So, if I understand correctly you are unable to build cb in the described case?
The first two (execvp) messages are new as far as I can tell.
I will try to dig into it deeper (maybe Null-compiler ?).
Yes, they are caused by the xml compiler code, Alpha can you look at them?
The error is triggered by bool Compiler::EvalXMLCondition(const wxXmlNode* node) .
This fixes the error, that causes "-version" to be the only command.
The error-message itself will still be there.
I suggest catching the error output and either give a more clear error message or just suppress it.
Index: src/plugins/compilergcc/resources/compilers/options_clang.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_clang.xml
+++ src/plugins/compilergcc/resources/compilers/options_clang.xml
@@ -25,7 +25,9 @@
<Program name="LD" value="clang++"/>
<Program name="DBGconfig" value="gdb_debugger:Default"/>
<Program name="LIB" value="llvm-ar"/>
- <if exec="llvm-ar -version">
+ <!-- LIB will be expanded to llvm-ar by Compiler::GetExecName()
+ llvm-ar can not be directly used here, because it can not be evaluated -->
+ <if exec="LIB -version">
<!-- found, do nothing -->
</if>
<else>
And yes I can not compile C::B from a C::B running inside C::B which has no console output (either real console or gdb).
Congratulations, you have discovered not one bug, but two! Compiler::GetExecName() is supposed to return the passed argument, if it is not a macro to be expanded. Also, it appears that asynchronous use of wxExecute() acts differently on Linux and Windows.
Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 8756)
+++ src/sdk/compiler.cpp (working copy)
@@ -1138,20 +1138,20 @@
}
wxSetEnv(wxT("PATH"), path);
cmd[0] = GetExecName(cmd[0]);
- if (node->GetAttribute(wxT("regex"), &test))
+
+ long ret;
{
- long ret;
- {
- wxLogNull logNo;
- ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd);
- }
+ wxLogNull logNo; // do not warn if execution fails
+ ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd);
+ }
+
+ if (ret != 0) // execution failed
+ val = (node->GetAttribute(wxT("default"), wxEmptyString) == wxT("true"));
+ else if (node->GetAttribute(wxT("regex"), &test))
+ {
wxRegEx re;
- if (ret != 0)
+ if (re.Compile(test))
{
- val = (node->GetAttribute(wxT("default"), wxEmptyString) == wxT("true"));
- }
- else if (re.Compile(test))
- {
for (size_t i = 0; i < cmd.GetCount(); ++i)
{
if (re.Matches(cmd[i]))
@@ -1162,20 +1162,17 @@
}
}
}
- else
- {
- wxLogNull logNo;
- long ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false));
- val = (ret != 0);
- }
- wxSetEnv(wxT("PATH"), origPath);
+ else // execution succeeded (and no regex test given)
+ val = true;
+
+ wxSetEnv(wxT("PATH"), origPath); // restore path
}
return val;
}
wxString Compiler::GetExecName(const wxString& name)
{
- wxString ret;
+ wxString ret = name;
if (name == wxT("C"))
ret = m_Programs.C;
else if (name == wxT("CPP"))
Yes, this part of the code should be more bulletproofed than the others :)
Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 8758)
+++ src/sdk/compiler.cpp (working copy)
@@ -1151,6 +1151,8 @@
else if (node->GetAttribute(wxT("exec"), &test))
{
wxArrayString cmd = GetArrayFromString(test, wxT(" "));
+ if (cmd.IsEmpty())
+ return false;
wxString path;
wxGetEnv(wxT("PATH"), &path);
const wxString origPath = path;
@@ -1171,20 +1173,21 @@
}
wxSetEnv(wxT("PATH"), path);
cmd[0] = GetExecName(cmd[0]);
- if (node->GetAttribute(wxT("regex"), &test))
+
+ long ret = -1;
+ if ( !cmd[0].IsEmpty() ) // should never be empty
{
- long ret;
- {
- wxLogNull logNo;
- ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd);
- }
+ wxLogNull logNo; // do not warn if execution fails
+ ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd);
+ }
+
+ if (ret != 0) // execution failed
+ val = (node->GetAttribute(wxT("default"), wxEmptyString) == wxT("true"));
+ else if (node->GetAttribute(wxT("regex"), &test))
+ {
wxRegEx re;
- if (ret != 0)
+ if (re.Compile(test))
{
- val = (node->GetAttribute(wxT("default"), wxEmptyString) == wxT("true"));
- }
- else if (re.Compile(test))
- {
for (size_t i = 0; i < cmd.GetCount(); ++i)
{
if (re.Matches(cmd[i]))
@@ -1195,20 +1198,17 @@
}
}
}
- else
- {
- wxLogNull logNo;
- long ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false));
- val = (ret != 0);
- }
- wxSetEnv(wxT("PATH"), origPath);
+ else // execution succeeded (and no regex test given)
+ val = true;
+
+ wxSetEnv(wxT("PATH"), origPath); // restore path
}
return val;
}
wxString Compiler::GetExecName(const wxString& name)
{
- wxString ret;
+ wxString ret = name;
if (name == wxT("C"))
ret = m_Programs.C;
else if (name == wxT("CPP"))
#0 0x00007ffff421d47f in wxPipeInputStream::CanRead() const () from /usr/lib64/libwx_baseu-2.8.so.0
#1 0x00007ffff488b4fb in wxGUIAppTraits::WaitForChild(wxExecuteData&) () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#2 0x00007ffff421de1e in wxExecute(wchar_t**, int, wxProcess*) () from /usr/lib64/libwx_baseu-2.8.so.0
#3 0x00007ffff421e863 in wxExecute(wxString const&, int, wxProcess*) () from /usr/lib64/libwx_baseu-2.8.so.0
#4 0x00007ffff421b950 in ?? () from /usr/lib64/libwx_baseu-2.8.so.0
#5 0x00007ffff3b823fb in ExpandBackticks (str=...) at /home/obfuscated/projects/codeblocks/git/src/sdk/globals.cpp:849
#6 0x00007ffff3b1534a in CompilerCommandGenerator::SetupCompilerOptions (this=0x26eae40, compiler=0x18c39d0, target=0x1ccd0a0) at /home/obfuscated/projects/codeblocks/git/src/sdk/compilercommandgenerator.cpp:936
#7 0x00007ffff3b0f554 in CompilerCommandGenerator::Init (this=0x26eae40, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/sdk/compilercommandgenerator.cpp:164
#8 0x00007fffe4783483 in CompilerMINGW::GetCommandGenerator (this=0x18c39d0, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/plugins/compilergcc/compilerMINGW.cpp:51
#9 0x00007fffd77d767e in NativeParser::AddCompilerDirs (this=0x17cbd90, project=0x1bf2cc0, parser=0x1cceb60) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:1988
#10 0x00007fffd77d0717 in NativeParser::DoFullParsing (this=0x17cbd90, project=0x1bf2cc0, parser=0x1cceb60) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:1044
#11 0x00007fffd77ce021 in NativeParser::CreateParser (this=0x17cbd90, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:570
#12 0x00007fffd77da80f in NativeParser::OnEditorActivated (this=0x17cbd90, editor=0x24f0240) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:2605
#13 0x00007fffd77ac5e0 in CodeCompletion::OnEditorActivatedTimer (this=0x17cbd10, event=...) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/codecompletion.cpp:3640
#14 0x00007ffff4219e26 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#15 0x00007ffff4219fab in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib64/libwx_baseu-2.8.so.0
#16 0x00007ffff421a2e4 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#17 0x00007ffff49873ee in wxTimerBase::Notify() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#18 0x00007ffff48ae1cb in ?? () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#19 0x00007ffff59b85ab in ?? () from /usr/lib64/libglib-2.0.so.0
#20 0x00007ffff59b79e2 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#21 0x00007ffff59b7d28 in ?? () from /usr/lib64/libglib-2.0.so.0
#22 0x00007ffff59b7de4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#23 0x00007ffff78d8b31 in gtk_main_iteration () from /usr/lib64/libgtk-x11-2.0.so.0
#24 0x00007ffff4892ba5 in wxApp::Yield(bool) () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#25 0x00007ffff488b5c5 in wxGUIAppTraits::WaitForChild(wxExecuteData&) () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#26 0x00007ffff421de1e in wxExecute(wchar_t**, int, wxProcess*) () from /usr/lib64/libwx_baseu-2.8.so.0
#27 0x00007ffff421e863 in wxExecute(wxString const&, int, wxProcess*) () from /usr/lib64/libwx_baseu-2.8.so.0
#28 0x00007ffff421b950 in ?? () from /usr/lib64/libwx_baseu-2.8.so.0
#29 0x00007ffff3b823fb in ExpandBackticks (str=...) at /home/obfuscated/projects/codeblocks/git/src/sdk/globals.cpp:849
#30 0x00007ffff3b1568e in CompilerCommandGenerator::SetupLinkerOptions (this=0x2698bc0, compiler=0x18c39d0, target=0x1cd3ad0) at /home/obfuscated/projects/codeblocks/git/src/sdk/compilercommandgenerator.cpp:965
#31 0x00007ffff3b0f5c7 in CompilerCommandGenerator::Init (this=0x2698bc0, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/sdk/compilercommandgenerator.cpp:165
#32 0x00007fffe4783483 in CompilerMINGW::GetCommandGenerator (this=0x18c39d0, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/plugins/compilergcc/compilerMINGW.cpp:51
#33 0x00007fffd77d767e in NativeParser::AddCompilerDirs (this=0x17cbd90, project=0x1bf2cc0, parser=0x2696830) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:1988
#34 0x00007fffd77d0717 in NativeParser::DoFullParsing (this=0x17cbd90, project=0x1bf2cc0, parser=0x2696830) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:1044
#35 0x00007fffd77ce021 in NativeParser::CreateParser (this=0x17cbd90, project=0x1bf2cc0) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/nativeparser.cpp:570
#36 0x00007fffd77a5a4c in CodeCompletion::OnProjectActivated (this=0x17cbd10, event=...) at /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/codecompletion.cpp:2385
#37 0x00007fffd77c213b in cbEventFunctor<CodeCompletion, CodeBlocksEvent>::Call (this=0x1b7c650, event=...) at include/cbfunctor.h:35
#38 0x00007ffff3b9967d in Manager::ProcessEvent (this=0x89e730, event=...) at /home/obfuscated/projects/codeblocks/git/src/sdk/manager.cpp:179
#39 0x00007ffff3bb8b52 in PluginManager::NotifyPlugins (this=0x117d880, event=...) at /home/obfuscated/projects/codeblocks/git/src/sdk/pluginmanager.cpp:1445
#40 0x00007ffff3bdb224 in ProjectManager::SetProject (this=0xdd4120, project=0x1bf2cc0, refresh=true) at /home/obfuscated/projects/codeblocks/git/src/sdk/projectmanager.cpp:494
#41 0x00007ffff3bdde36 in ProjectManager::LoadProject (this=0xdd4120, filename=..., activateIt=true) at /home/obfuscated/projects/codeblocks/git/src/sdk/projectmanager.cpp:802
#42 0x000000000049bb09 in MainFrame::DoOpenProject (this=0x16b50b0, filename=..., addToHistory=true) at /home/obfuscated/projects/codeblocks/git/src/src/main.cpp:1826
#43 0x000000000049b781 in MainFrame::OpenGeneric (this=0x16b50b0, filename=..., addToHistory=true) at /home/obfuscated/projects/codeblocks/git/src/src/main.cpp:1775
#44 0x000000000049e343 in MainFrame::OnStartHereLink (this=0x16b50b0, event=...) at /home/obfuscated/projects/codeblocks/git/src/src/main.cpp:2145
#45 0x00007ffff4219e26 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#46 0x00007ffff4219fab in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib64/libwx_baseu-2.8.so.0
#47 0x00007ffff421a2e4 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#48 0x00007ffff4219d92 in wxEvtHandler::ProcessPendingEvents() () from /usr/lib64/libwx_baseu-2.8.so.0
#49 0x00007ffff41972a9 in wxAppConsole::ProcessPendingEvents() () from /usr/lib64/libwx_baseu-2.8.so.0
#50 0x00007ffff4919c2a in wxAppBase::ProcessIdle() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#51 0x00007ffff489208e in ?? () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#52 0x00007ffff59b79e2 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#53 0x00007ffff59b7d28 in ?? () from /usr/lib64/libglib-2.0.so.0
#54 0x00007ffff59b811a in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#55 0x00007ffff78d8927 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#56 0x00007ffff48a6528 in wxEventLoop::Run() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#57 0x00007ffff4919a5b in wxAppBase::MainLoop() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#58 0x0000000000455cec in CodeBlocksApp::OnRun (this=0x7acb80) at /home/obfuscated/projects/codeblocks/git/src/src/app.cpp:787
#59 0x00007ffff41c7cda in wxEntry(int&, wchar_t**) () from /usr/lib64/libwx_baseu-2.8.so.0
#60 0x00000000004532b9 in main (argc=8, argv=0x7fffffffdac8) at /home/obfuscated/projects/codeblocks/git/src/src/app.cpp:266
I doubt that wxExecute is re-entrant function.
This patch makes it 100% reproducible:
diff --git a/src/sdk/globals.cpp b/src/sdk/globals.cpp
index f12fd76..38f672e 100644
--- a/src/sdk/globals.cpp
+++ b/src/sdk/globals.cpp
@@ -841,7 +841,7 @@ wxString ExpandBackticks(wxString& str) // backticks are written in-place to str
}
else
{
- Manager::Get()->GetLogManager()->DebugLog(F(_T("Caching result of `%s`"), cmd.wx_str()));
+// Manager::Get()->GetLogManager()->DebugLog(F(_T("Caching result of `%s`"), cmd.wx_str()));
wxArrayString output;
if (platform::WindowsVersion() >= platform::winver_WindowsNT2000)
wxExecute(_T("cmd /c ") + cmd, output, wxEXEC_NODISABLE);
@@ -849,8 +849,8 @@ wxString ExpandBackticks(wxString& str) // backticks are written in-place to str
wxExecute(cmd, output, wxEXEC_NODISABLE);
bt = GetStringFromArray(output, _T(" "), false);
// add it in the cache
- m_Backticks[cmd] = bt;
- Manager::Get()->GetLogManager()->DebugLog(_T("Cached"));
+ //m_Backticks[cmd] = bt;
+// Manager::Get()->GetLogManager()->DebugLog(_T("Cached"));
}
ret << bt << _T(' ');
str = str.substr(0, start) + bt + str.substr(end + 1, wxString::npos);