Error: Load_Room: Bad packed file

Started by arj0n, Thu 18/08/2011 18:59:17

Previous topic - Next topic

arj0n

I recently had a PC problem and due to that my game went corrupt.
So I went importing all the rooms into a new project.
Now, when opening several of these imported rooms I got the error message, poster after the line below.
Any idea what this caused? I really want to know so I can prevent this to happen again...
I have had no other PC problems at all so I got no clue...
(b.t.w., after re-importing these rooms again, they work properly again)



Error: Load_Room: Bad packed file. Either the file requires a newer or older version of
this program or the file is corrupt.

Version: AGS 3.2.1.111

AGS.Types.AGSEditorException: Load_Room: Bad packed file. Either the file requires a newer or older version of
this program or the file is corrupt.

  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)


arj0n

No one knows what this caused? :'(

Wyz

When it tried to load the room the version number included in the room file did not match the version number of the engine. This will happen when you try to load room files with an older or newer version of AGS, or when the portion in the room file that holds the version number is damaged and contains bogus data. If you're not sure which of the two is the case I should be able to tell the difference on closer inspection of the file I guess. :)
Life is like an adventure without the pixel hunts.

arj0n

Thanx Wyz.
The portion in the room file that holds the version number is indeed damaged and does contain bogus data.
But I knew that already. The big question for me is: how could this happen while nothing strange/bad/error-like has happen to my PC?

01. Working on an AGS project
02. PC crashes with probably the AGS project still open
03. I had to restart the PC
04. After restart: project has corrupt file 'game.agf'
05. Started a new AGS empty project, couldn't repair the corrupt project anymore.
06. Imported all the rooms into the new project for the 1st time.
07. All rooms which had already a room script: nothing wrong with these room when opening them.
08. Some rooms still didn't had a room script.
09. When trying to open them: error
10. So, imported these rooms-with-no-room-script again.*
11. When opening these rooms after the 2nd import: no problem anymore.

???

*rooms-with-no-room-script = an empty room script file.

Everything is logical except for this strange part:
when importing rooms for the first time: rooms with no script are corrupt somehow.
when re-importing these corrupt rooms: rooms with no script are not corrupt anymore.
*rooms-with-no-room-script = an empty room script file.

arj0n

@Wyz:

Here you can take a closer look if you like at a room from the old project (working room) and the new project, same room from the old project imported but not working anymore.

Wyz

I had a look at the room file, the corrupted one is wiped completely as in containing nothing but zeroes. I think something screwed with the import script and it failed halfway during the read and does not write back the contents instead leaving behind an empty file. So this is caused by the script file gone missing? What happens if you supply an empty one?
Life is like an adventure without the pixel hunts.

arj0n

Quote from: Wyz+ on Mon 22/08/2011 13:58:38
So this is caused by the script file gone missing?
Script file gone missing? If you mean the room script file, that one was empty but not missing, I didn't script anything yet for that room..

Quote from: Wyz+ on Mon 22/08/2011 13:58:38
What happens if you supply an empty one?
Supply an empty script file you mean?

Strange thing is, if I re-import the original room-file, it does work properly...

Wyz

Well that is strange, I have no idea what caused it. Let's hope it doesn't happen again. :)
Life is like an adventure without the pixel hunts.

arj0n

Quote from: Wyz+ on Tue 23/08/2011 15:12:52
Well that is strange, I have no idea what caused it. Let's hope it doesn't happen again. :)
*Fingers crossed*

And thanx for looking in to it, Wyz.

SMF spam blocked by CleanTalk