Author Topic: After solving TinyXML error message, my code become spacing!!  (Read 4257 times)

Offline xstud

  • Single posting newcomer
  • *
  • Posts: 3
After solving TinyXML error message, my code become spacing!!
« on: December 03, 2017, 06:34:56 pm »
Hi, I would like to ask for help about a massive problem that I faced.

After I use Code::Blocks to open my project file, an error appear: (I could not copy the exact information from the alert box, the line is different)

"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\user\AppData\Roaming\codeblocks\default.conf
At row 0, column: 0.

Then I followed the steps to troubleshoot by delete the default.conf file.

But when I open my project file again, my 500+ lines of code all are in 1 line and became something like spacing or other form of text. They can be highlighted but cannot see and edit, even build + run. I tried to copy to Notepad++, Microsoft Word, etc. all the software cannot display them.

The .c source file shows the file have the original size and the notepad++ shows that the length is 23190 in 1 line.

In both of the attachment photo, grey color is the highlighted.

I have no idea what's going on and this is my programming project that need to submit, I don't have any backup of it.

Perhaps I can get some solution or idea from you guys. Thank you so much!

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: After solving TinyXML error message, my code become spacing!!
« Reply #1 on: December 03, 2017, 08:14:11 pm »
can you upload the c file?
what if you open the file in a hex editor?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: After solving TinyXML error message, my code become spacing!!
« Reply #2 on: December 04, 2017, 12:30:50 am »
Did you look for a temp file? Like main.c.temp

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline xstud

  • Single posting newcomer
  • *
  • Posts: 3
Re: After solving TinyXML error message, my code become spacing!!
« Reply #3 on: December 04, 2017, 01:46:47 am »
Since the forum cannot upload .c file, I copied and paste into notepad as .txt

@BlueHazzard It shows the same number when I copied into hex editor.

@stahta01 I can't find it even I chosen view hidden file.
« Last Edit: December 04, 2017, 02:05:21 am by xstud »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: After solving TinyXML error message, my code become spacing!!
« Reply #4 on: December 04, 2017, 06:30:01 am »
The uploaded file contains nothing but blanks (hex 20).
If you do not have a backup your content is lost.

I never saw this behaviour before.

If Code::Blocks saves files it does it by writing a temp-file in the same directory and then delet the original one and rename the temp.
This is done to avoid such issues.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: After solving TinyXML error message, my code become spacing!!
« Reply #5 on: December 04, 2017, 11:19:03 am »
Are you using some wired security software like Malwarebytes Antiransomware?

The uploaded file contains nothing but blanks (hex 20).
Well this is bad. But i don't think codeblocks is the culprit here... Is it for all files, or only for one file?

Offline xstud

  • Single posting newcomer
  • *
  • Posts: 3
Re: After solving TinyXML error message, my code become spacing!!
« Reply #6 on: December 04, 2017, 02:51:25 pm »
@BlueHazzard I'm using Symantec Endpoint Protection. Only the main.c file affected.


Anyway, thanks for all of you willing to help me to solve this problem.

I already start to redo my coding since I need to submit soon. Thanks!  ;)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: After solving TinyXML error message, my code become spacing!!
« Reply #7 on: December 04, 2017, 08:00:10 pm »
This time you could try to use a vcs (https://en.wikipedia.org/wiki/Version_control)
(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!]