User forums > Using Code::Blocks
Strange crash
Miguel Gimenez:
CompilerGCC::PrepareCompileFile(wxFileName& file) checks if the editor pointer is not null, but inmediately after it uses the pointer anyway.
--- Code: --- cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
// make sure it is saved
ed->Save();
file.Assign(ed->GetFilename());
}
// Now activate the project this file belongs to
ProjectFile* pf = ed->GetProjectFile();
--- End code ---
I will fix this in a while. The remaining question is, why the pointer is null?
EDIT: Fixed in r13445
Grit Clef:
Oh, no! Today I built CB r13490 myself entirely, but when I ttied to run it, it crashed at startup! Luckily, I use the one in devel32. So the RPT file may include something useful.
P.S. I tried to delete all the conf files and restart CB, but it still crashed. This new RPT file is also attached.
P.S. 2 There must be some problems with KeyBinder, because when I delete it and start CB, nothing is wrong.
Pecan:
I just built and tested rev 13490 (cb 32_64, Win 11) but could not reproduce the problem.
I have no way of testing win 7 (cb 32).
Grit Clef:
Oh, I seemed to do something stupid when building CB. I had set a wrong compiler setting and linked a library that isn't needed, and that error was in that module. After I removed it, CB can start correctly.
Pecan:
--- Quote from: Grit Clef on March 11, 2024, 05:31:45 am ---Oh, I seemed to do something stupid when building CB. I had set a wrong compiler setting and linked a library that isn't needed, and that error was in that module. After I removed it, CB can start correctly.
--- End quote ---
Thanks for reporting that. I'm relieved it's not a hidden error somewhere.
We all make these little mistakes. God knows I've made my share.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version