Author Topic: I can't open Codeblocks! Gives me TinyXML error message  (Read 44781 times)

Offline Juice41

  • Single posting newcomer
  • *
  • Posts: 3
I can't open Codeblocks! Gives me TinyXML error message
« on: December 07, 2011, 09:43:56 pm »
So today I have no clue what happened, opened codeblocks, and it wouldnt open, just gave me this error:

"An exception has been raised!

The application encountered an error at
C:\Codeblocks\src\sdk\configmanager.cpp, on line 239.
The error message is:

TinyXML error: Error document empty.
In file: C:\Users\Mike\AppData\Roaming\codeblocks\default.conf
At row 0, column: 0.

Code::Blocks Version revision 6283 (gcc 4.4.1, build: Feb 27 2010 19:46:30)"


I'm not very good with computers, please tell me what to do!
Thanks!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: I can't open Codeblocks! Gives me TinyXML error message
« Reply #1 on: December 07, 2011, 09:45:22 pm »
In file: C:\Users\Mike\AppData\Roaming\codeblocks\default.conf
Delete this file when C::B is not running and then re-start C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Juice41

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't open Codeblocks! Gives me TinyXML error message
« Reply #2 on: December 07, 2011, 11:08:28 pm »
I open up my computer, go to C:, go to User, select Mike, but cant find the AppData folder. Any idea where it is or where to go?

Offline bluejayke

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: I can't open Codeblocks! Gives me TinyXML error message
« Reply #3 on: December 07, 2011, 11:14:01 pm »
it is probably a hidden folder. Google how to show hidden folders, than it will appear

Offline Juice41

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't open Codeblocks! Gives me TinyXML error message
« Reply #4 on: December 08, 2011, 04:23:38 am »
Never mind, I finally got it fixed, thanks so much for the help!!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I can't open Codeblocks! Gives me TinyXML error message
« Reply #5 on: December 08, 2011, 11:51:58 am »
I've committed the deadly sin of committing a change that I've not extensively tested (though I think it's trivial enough to work, and at least the compiler didn't reject it).

Raising an exception in the (unforeseen) case that a config file does exist but is empty is admittedly somewhat stupid. Code::Blocks now silenly fills in an empty xml header and root node as it would when it does not find a config file at all in the first place.

Now the important question that remains is: How can an existing config file become truncated... this should not possibly ever happen, unless the application crashes while saving the config (assuming you did not truncate it yourself).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."