Unable to Load Room File Error

Started by MaeveGlaistig, Thu 16/04/2020 06:17:19

Previous topic - Next topic

MaeveGlaistig

I've made a couple of games with AGS and it's always been pretty smooth sailing. However, this week I upgraded from 3.4.1 to 3.5...

I'm still able to edit/work with sprites, rooms, script files and so on. But when I try to compile the game, I get the following error:



QuoteAGS.Types.AGSEditorException: Unable to load the room file 'room43.crm'.
Format version not supported.
Required format version: 12079, supported 17 - 33.

Followed by a number of places where the error is thrown.

To my untrained eye, it looks like it's getting an incorrect number for the format "version", but I'm not sure how to go about correcting that. I've dug around in the manual and wiki as well as trolling the forums, but I wasn't able to find a solution.

Does anyone know what the issue is? I feel like it must be something simple looking me right in the face...

Slasher

If you have used something not known to the latest version then you can change compatibility in the general settings to show the version of the editor you made the game with..

Food for thought..

MaeveGlaistig

Hi, Slasher!

I gave it a shot with the following configurations:

QuoteScript API version: Latest version
Script compatibility level: 3.4.1
QuoteScript API version: Latest version
Script compatibility level: 3.4.0
QuoteScript API version: 3.4.1
Script compatibility level: 3.4.1

It was previously set to Latest version/Latest version.

Unfortunately, all these configs are giving me the exact same error.

MaeveGlaistig

UPDATE:

The room called out in the error message (43) is definitely the problem. I missed it the first time around because opening the script file works fine... but opening the actual room file causes the editor to crash.  :-[

I tried reimporting all sprites for that room (objects, mostly), but the crash persists. At this point, is there anything I'm missing, or is it possible that the room file itself is just corrupted or something? I can't open it, so I can't check on the background/masks etc.

Slasher

Can you post the Room Load Script for us to see.....

Khris

If you can no longer open the room from the editor, the same will be true for the engine. The file got broken somehow; I'd copy the room script, then delete and recreate the room.

If that's going to be a pain, now's the time to start with regular backups ;)

Crimson Wizard

Quote from: Slasher on Thu 16/04/2020 06:46:29
If you have used something not known to the latest version then you can change compatibility in the general settings to show the version of the editor you made the game with..

Room file format is not related to script compatibility.


The weird format number in the message usually indicates a file corruption.


Did this happen immediately after you moved to AGS 3.5.0, like first time you run compilation, or some time later?
Do you still have a backup from previous version (3.4.1)? If so, and you may open this room in AGS 3.4.1, then could you try copying it to AGS 3.5.0 project and see if it opens there?

MaeveGlaistig

Quote from: Crimson Wizard on Thu 16/04/2020 11:03:35The weird format number in the message usually indicates a file corruption.

Did this happen immediately after you moved to AGS 3.5.0, like first time you run compilation, or some time later?
Do you still have a backup from previous version (3.4.1)? If so, and you may open this room in AGS 3.4.1, then could you try copying it to AGS 3.5.0 project and see if it opens there?

Yes, it was immediate after moving to 3.5.0 - as soon as I tried to compile or F5 test, the error appeared.

Quote from: Khris on Thu 16/04/2020 08:31:02
If you can no longer open the room from the editor, the same will be true for the engine. The file got broken somehow; I'd copy the room script, then delete and recreate the room.

If that's going to be a pain, now's the time to start with regular backups ;)

It will be to redo all the hotspots etc... but let me be a lesson in the importance of separate backups! I may have one and if not, I just learned the hard way to make sure I do.

Thanks, everyone! :)

MaeveGlaistig

#8
Well, here's another update...

Great news! I had a recent backup, so I copied the script, replaced the room's .crm and .asc files from the backup, then pasted the script in and saved. Double-checked that all objects etc. were present, and tried to run an F5 test again.

Less great news! I didn't get a crash report this time... the editor simply goes directly from "Please wait while your files are saved" to closing the editor completely, with no further action. A look at the game files shows that the .agf files are updating/saving, but no test window for the game opens and the editor itself closes down completely with no fanfare.

Obviously the last step here is just to completely delete the room (which is now fully editable/interactable again from the backup) and try again, but on the off chance something else is going on, anyone...?

EDIT: Completely deleting the room actually did not solve this issue; attempting to run the game still causes a no-error-message shutdown of the editor even with the offending room deleted and not replaced.

Crimson Wizard

Quote from: MaeveGlaistig on Thu 16/04/2020 12:37:49
Great news! I had a recent backup, so I copied the script, replaced the room's .crm and .asc files from the backup, then pasted the script in and saved. Double-checked that all objects etc. were present, and tried to run an F5 test again.

By "double-checked objects", do you mean that you opened the room successfully in the editor?

Quote from: MaeveGlaistig on Thu 16/04/2020 12:37:49
Less great news! I didn't get a crash report this time... the editor simply goes directly from "Please wait while your files are saved" to closing the editor completely, with no further action. A look at the game files shows that the .agf files are updating/saving, but no test window for the game opens and the editor itself closes down completely with no fanfare.

Well, something wrong is with AGS then, it cannot process this particular room for some reason (or maybe something else is going on).

I wonder, would you be able/willing to send me the 3.5.0 project files and the room's backup to try compiling the game under debugger and investigate what causes the crash/corruption?

MaeveGlaistig

Correct, the room could open in the editor!

I've been messing with it some more and discovered that the issue seems to be more than one corrupted room (from what I can tell, it's rooms 43-48 at least, which are the most recent ones that I was working on over the past few days). Doing a quick Build > Rebuild All Files allowed me to see which file AGS was trying to compile when it shut itself down, which at the moment is room 47. Since I knew I'd been working on 48 & 49 recently, I tried opening them in the editor, only to get new errors: "Can't deserialize interaction scripts: too many events" for 48 and "Error: Read error decompressing image - file is corrupt" for 49.

At this point, I have to assume something is going on with the drive the game is saved on to have this many corrupted files, so I'm assuming I'll need to delete these rooms and restore them all from the backup I have.

Quote from: Crimson Wizard on Thu 16/04/2020 12:55:53I wonder, would you be able/willing to send me the 3.5.0 project files and the room's backup to try compiling the game under debugger and investigate what causes the crash/corruption?

Sure, if you'd like to take a look! I'm starting to think this is an issue with broken files on my end, but I can PM you a link. I have already replaced rooms 43-46 from backup, but room 47 is currently doing the no-error-message shutdown still when any attempt is made to run/compile.

Crimson Wizard

Quote from: MaeveGlaistig on Thu 16/04/2020 13:10:33
Sure, if you'd like to take a look! I'm starting to think this is an issue with broken files on my end, but I can PM you a link. I have already replaced rooms 43-46 from backup, but room 47 is currently doing the no-error-message shutdown still when any attempt is made to run/compile.

Thank you, I am primarily interested in finding out why is AGS crashing, and maybe fixing that, because in worst case it should report some error.

SMF spam blocked by CleanTalk