Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Digital Mosaic Games on Mon 04/01/2010 10:45:48

Title: System.Xml.XmlException: Root element is missing (SOLVED)
Post by: Digital Mosaic Games on Mon 04/01/2010 10:45:48
Hello,

I could ever resolve this damned error when I maked a backup copy of the game and deleted the "Game.agf-file" but now it doesnt work :'( I don´t know why.
(http://www4.pic-upload.de/04.01.10/c9mgqmojmag3.gif)
I´ve spent so much time in this game and now I can´t edit it. :'(
Can somebody help me please ???
Title: Re: This damned "Rootelement-Error"
Post by: Pumaman on Tue 05/01/2010 22:58:54
Did you get any errors when you tried to save the game prior to that happening? Or did your computer crash or turn off?

Which version of AGS are you using?

Have you had this problem before? Have you tried renamign the Game.agf.bak file to Game.agf?
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Wed 06/01/2010 12:47:04
QuoteWhich version of AGS are you using?
I´m using AGS 3.1.
QuoteDid you get any errors when you tried to save the game prior to that happening? Or did your computer crash or turn off?
I didn´t get any errors when I saved my game. There comes only a window which says that I should make a backup copy. But I think thats usually.
My computer haven´t ever turned off or crashed when I was ags-ing.
QuoteHave you had this problem before?
Yes I did get these errors before some times but before I could ever resolve the error
when I maked a backup copy and deleted the Game.agf file. In this time it didn´t worked. I have made a backup copy ever and ever and deletet the Game.agf file. Maybe there could be the problem.
QuoteHave you tried renamign the Game.agf.bak file to Game.agf?
In my game folder theres only a Game.agf and a Game.bak file. There isn´t a
"Game.agf.bak" which I can rename.
Title: Re: This damned "Rootelement-Error"
Post by: Pumaman on Sat 09/01/2010 17:27:04
Is the game on your hard drive, and not on a USB stick or anything like that?

Has anyone else had problems like this?
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Sun 10/01/2010 23:11:27
I have still only my backup copies which don´t work :(
Title: Re: This damned "Rootelement-Error"
Post by: Pumaman on Mon 11/01/2010 22:29:48
Is the game on your hard drive, and not on a USB stick or anything like that?
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Tue 12/01/2010 17:26:07
No, I have only my backup copies :(
Title: Re: This damned "Rootelement-Error"
Post by: monkey0506 on Tue 12/01/2010 17:35:32
Quote from: Pumaman on Sat 09/01/2010 17:27:04Is the game on your hard drive, and not on a USB stick or anything like that?
Quote from: Pumaman on Mon 11/01/2010 22:29:48Is the game on your hard drive, and not on a USB stick or anything like that?

Well seeing as CJ asked it twice (verbatim I might add) and you still haven't given a clear and direct answer...

I'm guessing that your backup copies are on a USB stick, floppy, ZIP disk, CD, DVD, or some other type of portable media that doesn't really classify as a HDD (hard drive).

When you are attempting to run these backup copies are you running them from the portable media directly or are you copying them to your hard drive first and running them from there?
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Tue 12/01/2010 18:09:53
No I have my backup copies only on my hard drive :(
Title: Re: This damned "Rootelement-Error"
Post by: Pumaman on Tue 12/01/2010 21:26:35
Let me rephrase the question ... with the original copy of the game that became corrupt, when it became corrupt was it on your hard drive, or were you editing it directly on a USB stick?

I ask because we have seen problems in the past where people have been editing a game on a USB stick and it hasn't saved the data properly, and has left them with corrupt files.
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Wed 13/01/2010 19:08:15
It became corrupt on my hard drive.
Title: Re: This damned "Rootelement-Error"
Post by: Ryan Timothy B on Fri 15/01/2010 17:01:55
I also just had this issue, word for word as his posted screenshot (minus the German) :P.

My video card crashed while I was testing my game, sometimes windows is able to get the video card to work again, sometimes not.  I've mentioned the problem already in the Tech thread.

But yeah, I did the renaming of Game.agf.bak to Game.agf, and it still gives the same error.

Starting to wish I didn't buy a laptop with an nVidia graphics card (it's a good thing I backed it up a week or so ago--it definitely would be nicer if AGS had a backup feature though).

Edit: Just happened again!! Dang Didly Darn Dang-it! :P
Title: Re: This damned "Rootelement-Error"
Post by: Digital Mosaic Games on Sun 17/01/2010 16:51:10
I´m SOOOOOOOOOOOOOOO HAPPY!!!! ;D
I´ve resolved this damned error :)´
In my backup copy I deleted the "Game.agf.user", deleted "Game.agf"(with blue cup icon) and renamed my "Game.agf.bak" to "Game.agf" and that it works!!!
Title: Re: This damned "Rootelement-Error"
Post by: Ryan Timothy B on Sun 17/01/2010 18:00:42
Ahh..

CJ didn't mention anything about the Game.agf.user, I also removed that and suddenly the dead games came back to life.
Too bad I've already created a new game each time the old one died, :( haha.
Title: Re: This damned "Rootelement-Error"
Post by: SSH on Wed 20/01/2010 03:09:07
If this is solved, can we change the topic title to include [SOLVED], please?

Also, might be worth addign a wiki page. Not that anyone reads it... :)
Title: Re: This damned "Rootelement-Error"
Post by: Gilbert on Wed 20/01/2010 05:57:52
This is more of a serious error regarding the software itself though (i.e. not specific personal mistakes on scripting and such). I'd rather wait for CJ to reply and say whether this is a valid solution to the problem(and why) before confirming.
Title: Re: This damned "Rootelement-Error"
Post by: Pumaman on Sun 24/01/2010 18:43:09
Ah yes, well spotted, in this case it looks like the Game.agf.user file was the file that was actually corrupt. This just stores some preferences and can be safely deleted without losing any game data.

Still, the file shouldn't become corrupted in the first place, please let me know if this happens again.