User forums > Using Code::Blocks

HELP! Codeblocks went nuts ? Missing compiler

(1/2) > >>

Elena:
Hi, using CB last public release on Win7 x64.
Everything was fine until today. I've been working with it without problems for about 15 days, I had set my compiler (WinLibs MinGW both x64 and x86 toolchains to compile for x64 and cross compile for x86), all without problems.
I haven't changed anything in my settings lately. Also my machine has no internet access, no viruses, no malicious software, no bloatware, no disk errors (brand new HD, scandisk reports no errors).
Today I opened a project I've been working on the past few days and...CB went nuts. Compiler settings are disappeared. If I try to compile I get this error message in red:

Project/Target: "ElenaDSPModules - Release_x64":
  The compiler's setup is invalid, so Code::Blocks cannot find/run the compiler.
  Probably the toolchain path within the compiler options is not setup correctly?!
  Do you have a compiler installed?
Goto "Settings->Compiler...->Global compiler settings->unknown->Toolchain executables" and fix the compiler's setup.

I tried to delete my global compiler settings (but they still looked fine, with the toolchain dirs all in place) to create them again (MinGW32 and MinGW64), but now when I open the project settings a window opens saying that the compiler cannot be located, I try to set them again for my targets but now the compiler option list is EMPTY! Where before I had many buttons for the checkmars and the various compiler options, now it is empty!
Luckily I had backed up my config file default.conf, so I deleted the supposedly corrupted one and replaced it with the backup copy. This did not solve the issue, so possibly it is some other config file getting corrupted... possibly the .cbp project files ? no idea. Still carrying further tests...

Addition: reinstalled mingw32 and mingw64 dirs in D: Nope,the compiler flags list is still empty, white !!! Those which were my flags are now listed textually in Additional Compiler Options as -m64 -o3 etc.

What's happening ?? Please help !!

Update: I disinstalled and reinstalled CB, then I restored my backed up default.config and now I have the compiler options back in place ! Evidently some config files got corrupted. You only can say which file is responsible for those compiler flags to show up or not, therefore I kindly ask you to investigate. Surely there is nothing wrong with my system, since everything is brand new and I never had any problems. The SSD where I have my system partition C: (where CB stores its config files) and D: (where CB, mingw32 and mingw64 are installed) is brand new, I changed it last week. I had no crashes during these days and as I said no filesystem errors show up with Scandisk.

Elena:
Still nobody ? Is it possible that nobody has an idea of what happened ? Sadly it is not something which you can replicate but it happened, please consider that thete is a bug somewhere causing such corruption! I hope it won't happen anymore but now I lost my confidence

BlueHazzard:
This is a bug we are on  the hunt for quite some time, but could not reproduce....
I had it 3 times in 10 years. So it is quite rear...
If this happens again, please send us the corrupt config file

The config file is located in c:\Users\USERNAME\AppData\Roaming\Codeblocks

One advice is to not use the global compiler options for storing compiler flags that are needed in a project.
Store compiler flags in the project file.
For the project it is ALWAYS a good idea to use a source code versioning system like git, and use it regularly. So if something went wrong (coding, or corrupt programs) you still have a functional version. This is a general advice, and has nothing to do with codeblocks in special....

[Edit:] Additional note: Codeblocks NEVER killed the project file for me, and there are special mechanics in place that prevent codeblocks from damaging source or project files

Elena:
Thanks for replying. The next time it should happen I will pay more attention to what exactly happened so to hopefully supply some more useful info. As I said, however, it looks like it is NOT the default.config file getting corrupted, because I had backed it up and once I restored it the problem persisted, so it is something else. No, I am NOT setting any compiler options in the general compiler options indeed, options and flags are all in the project and target settings in my case. I do not know anything of versioning though, I will investigate. Is that covered in CB manual? Any tutorials out there btw ?
As an additional note I must explain that after reinstalling I had to remove by hand three xml tags from the project file which I had inadvertedly saved after the problem showed up, tags which prevented CB from displaying the compiler options in the list as usual. Unfortunately I don't remember their name sorry, but they sounded like "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] setting do not rely on them" or a similar thing. They were three similar tags. Once I removed them the project worked again. Hope this helps

Elena:
Ps sorry for those words between [] I dont know why they got added, it's not me !!!

Navigation

[0] Message Index

[#] Next page

Go to full version