Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Crash @ Compile Current File
Ceniza:
Ok, for your consideration, quick fix which seems to be working:
plugins/compilergcc/compilergcc.cpp line 152 from:
--- Code: --- : m_CompilerIdx(-1),
--- End code ---
to:
--- Code: --- : m_CompilerIdx(0),
--- End code ---
I finally found the problem in there is the index never got updated so it tried to access an array at position -1.
Now, about the paths with spaces, I made this workaround (you're the ones who really know the code so it could be done somewhere else in a nicer way):
plugins/compilergcc/directcommands.cpp starting on line 269 from:
--- Code: --- wxString o_filename = fname.GetFullPath();
fname.SetExt(EXECUTABLE_EXT);
wxString exe_filename = fname.GetFullPath();
MakefileGenerator mg(m_pCompilerPlugin, 0, "", 0); // don't worry! we just need a couple of utility funcs from it
wxString compilerCmd = mg.CreateSingleFileCompileCmd(ctCompileObjectCmd,
0,
0,
filename,
o_filename,
wxEmptyString);
--- End code ---
to:
--- Code: --- wxString o_filename = '"' + fname.GetFullPath() + '"';
fname.SetExt(EXECUTABLE_EXT);
wxString exe_filename = '"' + fname.GetFullPath() + '"';
wxString i_filename = '"' + filename + '"';
MakefileGenerator mg(m_pCompilerPlugin, 0, "", 0); // don't worry! we just need a couple of utility funcs from it
wxString compilerCmd = mg.CreateSingleFileCompileCmd(ctCompileObjectCmd,
0,
0,
i_filename,
o_filename,
wxEmptyString);
--- End code ---
plugins/compilergcc/makefilegenerator.cpp starting on line 218 from:
--- Code: --- wxFileName fname(object);
--- End code ---
to:
--- Code: --- wxString object_unquoted(object);
if (!object_unquoted.IsEmpty() && object_unquoted[0] == '"')
{
object_unquoted.Replace("\"", "");
}
wxFileName fname(object_unquoted);
--- End code ---
I hope it be of any use.
mandrav:
Fixed in CVS. Thanks ceniza for pointing it out :)
Yiannis.
Navigation
[0] Message Index
[*] Previous page
Go to full version