Code::Blocks Forums
User forums => Help => Topic started by: pcoquill on February 20, 2013, 11:36:53 am
-
Hi,
I have, for a long time, installed C::B, and I updated it yesterday using the last NB (23 november). Everything was ok (launching, opening project, compilation and execution...)...until this morning, I got this message error at launching CB:
(http://www.unice.fr/coquillard/mssg.jpg).
Between yestday evening and this morning, nothing had change on my computer, except that windows made some update...
I use windows XP runing within the Virtual Box Ose (ubuntu).
Any Idea ?
Thank you.
-
I got this type of message once over a year ago.
Something had resulted in my default.conf being damaged in my case it was an empty file.
Tim S.
-
Hi Stahta,
Same thing in my case, the default.conf is empty. Dont know why. Besides, I make a new install from a new download (codeblocks-12.11-RC1-mingw-setup.exe), but nothing changed ! after the intallation stopped (and it said that everything was OK), the launching gave me the same error message. Strange ! What can I do (find an other install on one other computer and copy the default.conf ? but where is it in the hierachy of Windows 8 ? can't find it)
-
Just delete it, as the settings are lost anyway.
It's in %APPDATA%\CodeBlocks on windows.
-
Unless you truncated the file by hand, which is unlikely (you would know if you did), this can actually only happen if Code::Blocks crashes at shutdown, when the config file is overwritten. That's a scary thought, as that's not something that could conceivably happen (not in a way that could corrupt something, anyway). Unless it's some thread from some plugin (code completion parser?) that's crashing the app...
The save path under Windows 8 should be very similar to the one in Windows 7, give or take a "/Roaming/" (assuming you don't use that cloud store stuff).
If you don't find another config that you can copy, you should just delete that file, it will restore default settings, which is admittedly annoying but at least Code::Blocks will work again.
-
Hi Jens and Thomas, thanks a lot. I removed the >:( default.conf, and CB started, as usually. But I've lost a lot of things...(included recent projects..). I'll launch a new install.
Thanks a lot. This was very helpfull.
PS : I notice that there is something interesting about default.conf in the FAQs
-
not something that could conceivably happen
That said, I just looked at FileManager::Save, which is the function overwriting that file (or every other file that is being saved in Code::Blocks).
That function was initially implemented as writing to a temporary file and then swapping the two and doing a delayed delete of the former original.
What I see now is... something different? If I read the current code correctly, a temp file is created, then the original is overwritten, and the temp file is deleted. Not sure what the rationale was behind that change, does anyone remember?
-
The cause of your problem should be fixed with the next nightly build.
Instead of making a copy and overwriting the original (...?!) when saving, data is now being written to a temporary file, which is atomically moved over the original afterwards. This should prevent any such thing as "empty file" from happening.