Author Topic: An exception has been raised?  (Read 7664 times)

Offline Tom233145

  • Multiple posting newcomer
  • *
  • Posts: 12
An exception has been raised?
« on: April 21, 2016, 01:05:22 pm »
So I went to bed last night after working hard again on my "Cookie Clicker"-style game. I woke up, opened my laptop, and tried to get on the Code::Blocks project file. When I opened it, it gave this message:

An exception has been raised!

The application encountered an error at C:\CB15xx\src\sdk\configmanager.cpp, on line 236.
The error message is:
TinyXML error: Error document empty.
In file C:\Users\Thomas\AppData\Roaming\CodeBlocks\default.conf
At row: 0, column: 0.

Code::Blocks Version revision 10702 (gcc 4.9.2. build: Jan 25 2016 21:17:58)



So as you can probably tell this is kind of scaring me since I can't work on and compile my code until this is fixed.
Any help on this is very much appreciated and thanks in advance!

(Also, I'm using Windows 8 if that helps :) )

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: An exception has been raised?
« Reply #1 on: April 21, 2016, 03:56:24 pm »
Well, the description really explains it. Somehow you've managed to murder your config file. That wasn't necessarily your fault, but either way, it is what it is. If you have a backup of the config file stored somewhere, you can just copy it over, otherwise, you need to delete the empty file.

How did that happen? That's hard to tell. The config file is written when the application shuts down. An empty config file is generated if something crashes the application while it's writing out the config, or after that, before the file handle is closed (lazy writeback, on crash all buffers go *poof*). Maybe, possibly, some plugin crashed on exit. Maybe something else (shut down computer?). Impossible to know.

On a different note, I'm not sure why an empty config file raises an exception. Empty shouldn't functionally be much different from "not present", actually. It should probably show a message so the user who is wondering why the hell suddenly all settings are reset to default knows what's going on, but I guess the application should still be operational?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Tom233145

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: An exception has been raised?
« Reply #2 on: April 21, 2016, 09:59:12 pm »
Will I be okay without the config? Can I actually run C::B without the config?

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: An exception has been raised?
« Reply #3 on: April 22, 2016, 01:02:08 pm »
You will probably end up with default for all your settings which means you may need to configure your compiler paths and some other stuff again, but yes you can definitely use cb again with a new config file.

Offline Tom233145

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: An exception has been raised?
« Reply #4 on: April 22, 2016, 02:27:59 pm »
Alright, thanks all that has helped!   :)

-Tom