Invaild XML: Root Element Missing Help (Potentially Can be Fixed! See thread)

I was working on a game. I saved, then suddenly QUEST stopped responding, then my computer started bugging out and I ended up having to do a forced shut down. Now, when I open back up the game I get: "Invalid XML: Root element is missing" and I can't load the game.
I really hope there is a fix as I was pretty far in and would hate to have to redo everything.


What you are describing sounds like the save file got messed up. Try opening your game's source file (.aslx) with a texteditor like notepad++.
With some luck, you only lost the init tags (like what libraries to include, etc) which can be easily replaced. If you're unlucky and your computer crashed mid-save... this'll teach you to make regular back-ups.


I'm pretty sure it did screw-up mid save. I'll try notepad++ when I get home, but I'm not hopeful.


OK, I opened it with notepad++ and I can defintely say it is borked. All that's there are "NUL" over and over.
Unless, there is a way to fix that, looks like I will have to start over. At least I kept most of my puzzles, points, and game over situations written down so that would help speed things up.

If there is somehow a way to fix this, let me know.


OK. Using a program, I was able to recover a slightly earlier version of the game.
Now, I get a different error when loading up:
"Invalid XML: Invalid Character in the given encoding: Line 1, position 1"


If you open the file in your favourite text editor, you should be able to see what's actually there. It's possible there could be a few characters mangled, and fixing them will let Quest open it again.
If you don't know the XML format that well, it might be better to share the recovered file so that someone with more experience can try to fix it for you.


I agree with mrangel, let us have a look at it. Also, are you sure you are checking the right file? it has to be the .aslx file, not the .quest. Published games are compiled with their libraries and, as far as i know, not that easily readable.

To see how a proper game source would look like, just create a new TA/gamebook and enter code view by pressing F9.


A lot of null bytes could mean you're trying to open the wrong file, or it could mean that the file is corrupt. So I guess that's another thing to check :) That didn't occur to me.

as far as i know, not that easily readable.

A .quest file is just a .zip with a different file extension. The game.aslx inside it is your game file, but with any include lines replaced by the content of the library they refer to (and some types, such as editor_room and editor_object, removed).

So, it's theoretically possible to reverse-engineer it to get back to your game, but it might be a fair bit of work.
My previous answer assumes that what you have is actually an .aslx file;


It is an .aslx file. I can share it with you guys, but I don't know how to post it here. I've only done it via e-mail on the past. I can't do it right this second, because I'm at work.


You could send it via e-mail, but that is labourious for everyone involved. Using a file-sharing service would be one option (although you can be sure i quarantine and triple-scan everything recived that way, i'm paranoid), but i think the easiest way would be just uploading your game.

If you set it to private, nobody but you, admins/mods and people you share the link with can see it. And you already claimed your game's title slot!

From experience i can tell this website really isn't picky even when the code is dysfunctional mess, so as long as you upload the right format, it probably works.

@mrangel I confess i used unappropiate wording, please let my show my penitence by flagelating myself with this burnign hot steel rod!

(Seriously, a .zip file? I knew it included all the libraries and compiled the code, but i didn't knew it was zipped.)


Looks like the recovered earlier version might be a piece of an SQLite database, but it's not intact enough to recover any data from it. Either whatever method you used to recover it has picked up the wrong thing, or the underlying filesystem has got messed up somehow.

Not sure what else I can suggest here.

(Seriously, a .zip file? I knew it included all the libraries and compiled the code, but i didn't knew it was zipped.)

A lot of modern file formats are just a zip with a different extension, containing an XML file of some kind and a directory full of images and media. This includes .docx (MS Word file) and .mobi (Kindle books) as well as .quest. If you're curious, try renaming the extension on one of them and take a look what's inside it.


Ok.

Here's the Root Element version: https://drive.google.com/file/d/1sES2sAmrbyNSqgtonwaIg4_nwkYmqnVq/view?usp=sharing
Here's the Encoding version: https://drive.google.com/file/d/1NIioyMso_FTqDKEH16MOGweZOLwwxd9L/view?usp=sharing

So that more people can potentially view and help. I'll see if that does anything, mrangel.


I can not download your links/the page doesn't load for me. Are you sure you're using google drive properly?

Could also be an issue on my side though. Purportedly Firefox fixed that their new cache update doesn't loads certain things properly, but who knows. ¯\_(ツ)_/¯ I might try later again.

EDIT: For whatever reason, this forum doesn't displays the backslash in the good ol' shruggie i used there.Putting it into code worked. Whatever.


Sorry for the double-post, but i still wasn't able to download from google drive. Either Alphabet hates me, or you posted incorrect links.

Anyway, what i would suggest is to take the file you restored, open it with a text editor, and try copying the important contents (room descriptions, for example, are saved in plain text strings. All of your script should be accesible too) and copy them to a notepad or something. Then create a new "empty" game and fill it with what you copied. You can either do this step-by-step through the editor, or do it directly in XML view, if you feel confident enough.


Anyway, what i would suggest is to take the file you restored

The restored file is a binary file; and doesn't appear to be a zip file.
The other file is the exact same number of bytes, but is entirely null (The binary representation is all zeros).

Coincidentally, the files seem to be the right size to be disk images of Amiga floppies.
This seems pretty large for an XML file. So I can't help wondering if the file got substituted for something else. But I can't explain how the latest file and an older recovered one come to the same size; that seems incredibly unlikely.


Amiga floppies. Heh.

Anyway, then i missunderstood the OP on this one. May i ask which software you used to restore the file? Probably there is some tool out there to get it back in shape from binary representation. If not... idk, from your words about the notes you've taken, you probabaly already recreated significant parts whilst we were discussing.

I'm sorry i can't help much further.


I'm assuming it's an extent-based file recovery utility.

A directory can be thought of as a file containing the names of all the files in it, and coordinates for their physical locations on disk. If a file has grown, but the extra data isn't all at the end, it's not uncommon for the filesystem to write the entire file at a new location, while the old version is still where it used to be (but that part of the disk is now marked as "free").

Because NTFS extents maintain a history, it's possible to "recover" files by looking at the place on the disk where they used to be. But there's no way to tell if another file has been placed there in the mean time.

That would explain why the "recovered" file is a file that's the same size as your document, but contains data from a completely different app. Recovering that data was difficult, because the new file might not be in exactly the same place as the old one; you get a few blocks of something else at the beginning, or the first few blocks missing. But, in case it's something that could be salvaged to yield some of your data, I poked this further.

It looks to me like the file you've posted is a chunk from the middle of the cookies.sqlite file, as used by Firefox. (I believe Chrome also uses SQLite; but having determined that the file's contents are definitely web cookies, I see no reason to analyse it further)


The program I used was Recuva. I was suggested to use it by someone else.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums