Root element missing? [problem resurfaced]

Started by Sirpunchula, Sun 18/10/2009 17:45:58

Previous topic - Next topic

Sirpunchula

Last night i saved and closed my game with no problems, only to discover this when i tried to load it back up today:

Quote
An error occured whilst trying to load your game. The error was:

Root element is missing.

Error details:
Code: ags
System.Xml.XmlException: Root element is missing.
 at System.Xml.XmlTextReaderImpl.Throw(Exception e)
 at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
 at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
 at System.Xml.XmlTextReaderImpl.Read()
 at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserve Whitespace
 at System.Xml.XmlDocument.Load(XmlReader reader)
 at System.Xml.XmlDocument.Load(String Filename)
 at AGS.Editor.AGSEditor.LoadUserDataFile(String fileName)
 at AGS.Editor.AGSEditor.LoadUserGameFile(String fileName)
 at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)
 at Ags.Editor.InteractiveTaskLoadGameFromDisk(String gameToLoad)

I'm don't know what this means, is there anyone who knows what I can do to fix this?
Pardon my deadpan.

Pumaman

Make a backup copy of the game folder, then delete the Game.agf.user file and try again.

Sirpunchula

#2
Thanks, that fixed the problem.
Pardon my deadpan.

Sirpunchula

 Now the backup copy has the same Root element problem with the same message as above, but now deleting the "Game.agf.user" file doesn't solve the problem. Is there any other way I can fix this and keep the problem from resurfacing?
Pardon my deadpan.

Pumaman

Why are you trying to use the backup copy if the main copy is working?

This problem should not surface at all, let alone re-surface. Are you sure that the latest error you're getting is identical to the first one? Have you been using the "Send Error Report" button?

The error indicates that the game files haven't been saved properly. This should never happen, so I'm not sure why it's happening to you. Is the game on your hard drive, and not on a USB stick or anything like that?

Sirpunchula

Quote from: Pumaman on Wed 21/10/2009 21:23:05
Why are you trying to use the backup copy if the main copy is working?

This problem should not surface at all, let alone re-surface. Are you sure that the latest error you're getting is identical to the first one? Have you been using the "Send Error Report" button?

The error indicates that the game files haven't been saved properly. This should never happen, so I'm not sure why it's happening to you. Is the game on your hard drive, and not on a USB stick or anything like that?


-  My main copy isn't working; It had the same error as my backup does now.
-  I've compared the current error to the previous one up above; They're exactly the same, with the only exception being that deleting the "game.agf.user" file no longer solves the problem.
-  I didn't know there was a send error report button, where is it located?
-  And yes, I'm saving all of my files onto a hard drive.
Pardon my deadpan.

Pumaman


Sirpunchula

Pardon my deadpan.

Pumaman

Strange, I'm not sure why you would be getting a problem like this, it seems to indicate that the game files haven't been saved properly ... but if you didn't get any problems saving it then I don't understand why this would happen.

Has anyone else experienced any problems like this?

Digital Mosaic Games

Yes, I´ve got the same problem. I´ve made a backup copy and it worked.
But this time it came the "rootelement missing-error" again and I made a backup copy again but it didn´t worked. ???

Pumaman

Did you get any errors saving the game the last time before that? Are you saving it to your hard drive rather than a USB stick or anything like that?

Rubishov

I'm having the exact same problem. I'm saving on a hard drive, and deleting the Game.agf.user file doesn't help. Did anyone ever find a solution to this?

lakespiral

#12
Same problem here. Haven't started AGS in a while and now it gave me this warning even though I didn't open any files. I opened the game I was last working and the error screen appeared a second time.

Edit: It doesn't open the game at all. "Unable to read the user preferences file. You may lose some of your Preferences setting and may not be able to access Source Control. The error was: Root element is missing."

Cassiebsg

Uhm... actually I had that error a while ago too. Never figured what exactly happened, after panicking for a bit, I reopened my project and everything seemed fine, I  checked all the preferences but they all seemed to be like I had them before... I was confused, and haven't seen the error since.

Using 3.4.0.7 at the time.
There are those who believe that life here began out there...

Crimson Wizard

#14
Quote from: lakespiral on Tue 05/07/2016 15:29:23
Edit: It doesn't open the game at all. "Unable to read the user preferences file. You may lose some of your Preferences setting and may not be able to access Source Control. The error was: Root element is missing."
You say it does not open at all, do you mean that after this message it just goes back to Welcome window (where you select from recent projects)?

Where is your project located, in general (user documents, drive C, other?)

If you don't mind, could you post contents of Game.agf.user here?

lakespiral

#15
Yes. It goes back to the welcome window. The project is on my desktop. I opened the Game.agf.user file with notepad but there was nothing there. Three empty lines.

Edit: Ags version 3.3.3.0 I've had some blue screens (not related to ags). Don't remember if AGS was running at the time that happened...

Crimson Wizard

Quote from: lakespiral on Wed 06/07/2016 16:32:39
Yes. It goes back to the welcome window. The project is on my desktop. I opened the Game.agf.user file with notepad but there was nothing there. Three empty lines.
It actually sounds like the file got corrupted. Did you try just deleting it? AGS is supposed to recreate it.

lakespiral

I moved it to another folder and that didn't do a thing. It didn't recreate it. Game.agf is also a bunch of empty lines. Argh. Well. There goes that game. I'm going to have a hard time explaining it to my daughter :~(

Crimson Wizard

#18
Quote from: lakespiral on Wed 06/07/2016 17:38:22
Game.agf is also a bunch of empty lines.
Oh... well, Game.agf is a main file, so if it got damaged there is not much you can do except for recreating the project.
But if other files in your game are still intact, that may not be THAT hard to do. Rooms, scripts, sprites - they are all stored separately. You may want to try if you can create a new empty project and import them there.

Also, make backups of your game regularily. (I really suggest learning file version control at some point)

lakespiral

Took some hours of intensive work, but got it back together. Will make more backups in the future. What does file version control mean?

SMF spam blocked by CleanTalk