Crash when compiling game after updating global header file

Started by fovmester, Mon 06/07/2009 21:08:15

Previous topic - Next topic

fovmester

I just added a new function to my global script, and an import of this function to the global header file. This resulted in all my rooms needing to be rebuilt, of course. During the course of the rebuilding, AGS crashed during the build of room 21. I could open the game again and tried to compile again (in retrospect that might have been a bad idea). Now the compile continued, skipping room 21 and continuing to room 33 before the same happened again. I restarted and compiled like this a couple of times until all the rooms had compiled (or been skipped). Now when I tried to edit room the rooms that were skipped I got the following exception:

Code: ags

Error: Load_room: old room format. Please upgrade the room.
Version: AGS 3.1.2.82


AGS.Types.AGSEditorException: Load_room: old room format. Please upgrade the room.
   at ThrowManagedException(SByte* message)
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Now, the rooms in question are not older than the others in the game so there is something fishy here.

First of all, why did the editor crash during the compilation? I have not changed the header file in a long time, during which I have updated the AGS version several times.

Secondly, why did this cause an "Old room format" exception? The rooms that are corrupt are rather old and were all created with old AGS versions (v2.6-2.7), but they are only 4 rooms out of at least 20 rooms which are equally old.

I would really appreciate if you could look into this, CJ! And I sure hope there is a simple way to restore the game into a working state again (I have backup of all the rooms that are not working).

Thanks!

PS. I am using AGS 3.1.2.82.

monkey0506

You said you've changed AGS versions several times right? In doing so have you rebuilt all of the rooms? I have noticed (in my experience) that sometimes when importing an older game it doesn't rebuild all (any?) of the room files.

Try perhaps loading each room and make sure that it saves properly when you select the "Save Room" option. That should make sure the room scripts get properly compiled and if anything needs to be updated then it should let you know.

Pumaman

Is this the first time that AGS 3.x has had to rebuild all the room files in this game?

When you upgrade a game from AGS 2.x, you need to load it into 2.72 and Rebuild All Rooms to make sure that AGS 3.x can read them.

If you haven't edited those two rooms since AGS 2.6, then the 3.x editor will not be able to read them. If that's the case, then loading them into 2.72 and saving them again should get them working.

SMF spam blocked by CleanTalk