Windows 10-x64-v1809
wxWidgets3.1.1-x64 with mingw64-7.2.0
CB rev11543
https://imgur.com/a/ffeftePHi,
When I try to open an old project, which has an innvalid compiler (I've installed a fresh os recently so that compiler is not in my pc) caused this assertion and after pressing Ok, program closes.
The assert added with rev11541 in \src\plugins\codecompletion\systemheadersthread.cpp:145. Before that, it just warns with a info popup about innvalid compiler like "cannot find compiler's executable..." message, then you can add or fix the compiler's path and go on.
Source of the assertion above is CodeCompletion::GetSystemIncludeDirs.
If the project and the targets of it have innvalid compiler, the only path in incDirs arraystring is the project path itself. Then it is removed in codecompletion.cpp:1615 and caused incDirs.size=0.
Steps to reproduce:
- Create a console project.
- Add a header to project. (like F11-main.h)
- Save and close it.
- Open this project file with a text editor and change Project/Option compiler, Project/Target Debug/Option compiler and Project/Target Release/Option compiler from "gcc" to "gccInvalid" or something else.
- Open this modified project with codeblocks.
This ticket
https://sourceforge.net/p/codeblocks/tickets/780/ could be related, so I didn't create a ticket for now.
Edit: Hehe, I replaced all to innvalid but forgot the subject
.