If, for some reason, the CC plugin tries to access the MSVC compiler on linux, it certainly will not succeed. If that is the issue, it should just give up, but not crash.It checks for the presence of the executable in a way that wxExecute (which we use) won't return success... However - I could tell you exactly if you were willing to compile C::B yourself or (maybe) provide a minimal test project for the Linux devs to reproduce. MAybe you can strip-down your project to something usable...?!
If, for some reason, the CC plugin tries to access the MSVC compiler on linux, it certainly will not succeed. If that is the issue, it should just give up, but not crash.It checks for the presence of the executable in a way that wxExecute (which we use) won't return success... However - I could tell you exactly if you were willing to compile C::B yourself or (maybe) provide a minimal test project for the Linux devs to reproduce. MAybe you can strip-down your project to something usable...?!
Thanks, I have put a small (397 kB) file here (http://arnholm.org/cpde/cpde_app.zip)Hopefully one of the Linux devs with debugging capabilities can pick it up...
Compiler* compiler = CompilerFactory::GetCompiler(project->GetCompilerID());
cb::shared_ptr<CompilerCommandGenerator> generator(compiler->GetCommandGenerator(project));
Question is: what to do in this case, just step out the function or ... ?For now I would do what's attached (which avoids the crash).
CC devs should look into it I think.
Error is simple: nativeparser.cpp:1921CodeCompiler* compiler = CompilerFactory::GetCompiler(project->GetCompilerID());
cb::shared_ptr<CompilerCommandGenerator> generator(compiler->GetCommandGenerator(project));
Missing check for nullptr.
compiler is 0x0, therefore it crashes (obviously).
Question is: what to do in this case, just step out the function or ... ?
CC devs should look into it I think.
On Windows I have the opposite case, no GCC compiler installed, but it does not cause any crash or other problems, and it should not.The difference is most likely that the entry (compilerID) for the gcc compiler exists on windows, but it is (probably) not configured, but on linux no msvc compilerID exists.
I've committed a patch (slightly different to the one posted here) to trunk that should at least fix the crash bug.Dammed - that one didn't really work due to the shared pointer. Now I am unsure, how to do it.
A *a=func();
shared_ptr<B> p(a ? a->makeB() : nullptr);
if (p)
...
shared_ptr<B> p(nullptr);
A *a=func();
if (a)
p=shared_ptr<B>(a->makeB());
if (p)
This looks like I did it, except that I used 0 and not nullptr, right? Then ti should be OK to commit to resolve the crash.CodeA *a=func();
shared_ptr<B> p(a ? a->makeB() : nullptr);
if (p)
...