Author Topic: Fatal assertion error when opening project with invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEAR  (Read 3257 times)

Offline Quiss

  • Multiple posting newcomer
  • *
  • Posts: 76
Windows 10-x64-v1809
wxWidgets3.1.1-x64 with mingw64-7.2.0
CB rev11543

https://imgur.com/a/ffefteP

Hi,

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 :).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Quiss

  • Multiple posting newcomer
  • *
  • Posts: 76
I've built and tried it, the problem is gone. Thanks.