Do you think this is the problem caused by wxExecute?
Maybe, you can try to comment the portion where the compiler is called to obtain the macros.
Manager::Get()->GetMacrosManager()->ReplaceMacros
Does this function thread safe?
I don't know, to be honest. But I doubt its the call from CC that fails - the
compiler cannot replace the macros. For CC it seems to work, otherwise you wouldn't have CC working properly.