Adventure Game Studio Official

User reported issues for officially released versions of AGS

Bug Issue: AGS won't load due to missing "Root Element."

Pages: [1]

BigHairyEyeball

  • AGSer
  • Posts: 13
« on: 12 Aug 2017, 00:58 »
I just tried booting up my copy of AGS 3.4.0, and I received the following message:

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

ROOT ELEMENT IS MISSING

Error details: System.Xml.XmlException: Root Element is missing
  at System.Xml.XmlTextReaderlmpl.Throw(Exception E)
  at System.Xml.XmlTextReaderlmpl.ThrowWitho utLineInfo(String res)
  at System.Xml.XmlTestReaderlmpl.ParseDocum entContent()
  at System.Xml.XmlTextReaderlmpl.Read()
  at System.Xml.XmlLoader.Load(XmlDocument doc, Xml reader, Boolean preserveWhitespace)
  at System.Xml.XmlDocument.Load(XmlReader reader)
  at System.Xml.XmlDocument.Load(String filename)
  at AGS.Editor.AGSEditor.LoadGameFile(String filename)
  at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)
  at AGS.Editor.InteractiveTasks.LoadGameFro mDisk(String gameToLoad)

I have no idea what this means; however, the other games I've got are working fine when I attempt to load them up. Is this a problem with the document itself, or the program? Did my data get corrupted somehow? If I revert to an older, backed up version of the game will it work alright, or is the entire file corrupted? Please let me know ASAP - I'm working on this on a bit of a deadline for class, and I'd like to have an idea of what happened before I start fooling around with older versions or possibly messing up my files futher.

Crimson Wizard

  • AGSer
  • Posts: 7,269
« Reply #1 on: 12 Aug 2017, 01:09 »
Game.agf is the main file of the game project, it is a text file of XML format. The error means that there is something wrong with it (maybe it got corrupted).

Could you upload it somewhere? I may take a look at it and tell what's wrong.

Also, there should be Game.agf.bak file, which is an automatic backup of Game.agf. You may try copying Game.agf somewhere just in case, and rename Game.agf.bak to Game.agf, and see what happens.
« Last Edit: 12 Aug 2017, 01:10 by Crimson Wizard »

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #2 on: 12 Aug 2017, 01:16 »
Game.agf is the main file of the game project, it is a text file of XML format. The error means that there is something wrong with it (maybe it got corrupted).

Could you upload it somewhere? I may take a look at it and tell what's wrong.

Also, there should be Game.agf.bak file, which is an automatic backup of Game.agf. You may try copying Game.agf somewhere just in case, and rename Game.agf.bak to Game.agf, and see what happens.

Not a problem. Here's the Game.AGF file: https://www.dropbox.com/s/xcp6b6t62khxmoh/Game.agf.user?dl=0

I'll try the rename now and see what happens. Cross your fingers!

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #3 on: 12 Aug 2017, 01:21 »
Can't seem to rename the Game.AGF.bak file - even after removing the original file and saving it elsewhere, the computer still thinks it's there (even after I checked for any hidden files and found it was not). I'll keep trying.

If you can help, I owe you one.

Crimson Wizard

  • AGSer
  • Posts: 7,269
« Reply #4 on: 12 Aug 2017, 01:30 »
What you uploaded is Game.agf.user, which is a different file (it has some user-related stuff in it, not necessary for the project). I think you might have mistaken them. Extensions might be hidden in your windows explorer? You need to find a file which has exactly AGF in Extension (File Type) column.
« Last Edit: 12 Aug 2017, 01:33 by Crimson Wizard »

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #5 on: 12 Aug 2017, 01:35 »
Sorry, my mistake - I had extensions hidden. Here's the original AGF file. Going to try to work with the backup as well. Thanks!

https://www.dropbox.com/s/wegf5ntdhfe788g/Game.agf?dl=0

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #6 on: 12 Aug 2017, 01:37 »
... renaming Game.AGF.bak didn't work. Well, it did, but I only have the one room in my build, not the 17 rooms and all the coding I've done.

Crimson Wizard

  • AGSer
  • Posts: 7,269
« Reply #7 on: 12 Aug 2017, 01:49 »
This is strange, I do not see any errors there, and AGS can open the file too (except it cannot find any additional files from the game, obviously). Also it has only one room mentioned in it. Are you sure you did not replace it with backup previously?

Well, it did, but I only have the one room in my build, not the 17 rooms and all the coding I've done.

Script is located in separate ASH/ASC files, rooms are separate files too (CRM), and they may be imported back. Most important is to check if Dialogs and other things (characters etc) are in place, because they are stored in Game.agf.

How to reimport rooms and script modules.
(Before doing this better make a full copy of the game folder just in case.)

Rooms are imported very easily by right clicking on Rooms tree node and choosing "Import room".

Script modules (globalscript and others) are little annoying, because AGS cannot import them directly for some reason (missing a feature, I guess). You can do this following way:
1) Move all script modules (except room scripts!) somewhere else (or delete them if you have made backup just now).
2) Create script modules with same names in the project, they will be empty of course.
3) Copy all the files back (just overwrite new empty scripts).
« Last Edit: 12 Aug 2017, 01:52 by Crimson Wizard »

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #8 on: 12 Aug 2017, 02:03 »
This is strange, I do not see any errors there, and AGS can open the file too (except it cannot find any additional files from the game, obviously). Also it has only one room mentioned in it. Are you sure you did not replace it with backup previously?

Sorry, sent the wrong version again. That was the old Sierra file - I recently moved to the 9Verbs style instead. Here's the actual file: https://www.dropbox.com/s/da8mikevhx3t5qw/Game.agf?dl=0

Sorry to keep wasting your time - but to save some more of your time, I tried renaming the backup of this file as you suggested, and I received the same error I mentioned at the very beginning of the thread.

Crimson Wizard

  • AGSer
  • Posts: 7,269
« Reply #9 on: 12 Aug 2017, 02:31 »
Ah, sorry to say this, but the file is totally corrupted. You can see that if you open it in a text editor, there is no meaningful content inside.
« Last Edit: 12 Aug 2017, 02:34 by Crimson Wizard »

BigHairyEyeball

  • AGSer
  • Posts: 13
« Reply #10 on: 12 Aug 2017, 02:40 »
Crap. Okay, going to try something else. Thanks for all your help, dude. I really appreciate it. Wish me luck - it's a bit late in the game for me to do a full rebuild.

Fingers crossed.

Crimson Wizard

  • AGSer
  • Posts: 7,269
« Reply #11 on: 12 Aug 2017, 02:46 »
Remember you can still try re-importing latest script and rooms back into any working backup, or even into new empty project, as I exlained above, - given they are not corrupted also.
« Last Edit: 12 Aug 2017, 02:47 by Crimson Wizard »

Pages: [1]

Issue Details

  • Reported
    12 Aug 2017, 00:58
  • Updated
    12 Aug 2017, 02:46
  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    Adventure Game Studio 3.4, AGS 3.4.0
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine | Video

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011