Crash level... HELP

Started by Peegee, Fri 01/04/2022 10:18:52

Previous topic - Next topic

Peegee

Hello, I was working on the 7th level, it's starting to take a lot of data, lines of code (10800 in the global script for example) and I found that it was starting to be sensitive, weird, esoteric bugs and finally the level has crashed. Do I risk the same problem if I restart the level from zero, am I reaching the limits of the software?
This is what he tells me:

Code: ags


Error: Unable to load the room file 'room7.crm'.
Block data overlapping.
Block: Main, expected to end at offset: 11, finished reading at 0..
Version: AGS 3.5.1.9

AGS.Types.AGSEditorException: Unable to load the room file 'room7.crm'.
Block data overlapping.
Block: Main, expected to end at offset: 11, finished reading at 0..
   Ã  ThrowManagedException(SByte* message)
   Ã  load_room_file(SByte* )
   Ã  load_crm_file(UnloadedRoom roomToLoad)
   Ã  AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   Ã  AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   Ã  AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   Ã  AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   Ã  AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   Ã  AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   Ã  AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   Ã  System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   Ã  System.Windows.Forms.TreeView.WndProc(Message& m)
   Ã  System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   Ã  System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)


Peegee

Is the level recoverable? If I start it again, what tells me that it won't start again ? Should the game be made in several parts, several executables?

Crimson Wizard

#2
This error usually means that there have been a file corruption. For example: program crashed during save, operating system crashed, power outage etc.
Of course there's certain chance of having a mistake in the editor itself. But it's impossible to tell without knowing circumstances of how this happened, for example having a file backed up small time before it went wrong, and knowing the last things you did to it.

Error messages sais that "finished reading at 0", probably the file is zero size?
I don't think room itself is recoverable, but it's better to check whether room script remains as it is a separate file called room7.asc. If it still has script inside, then it may be kept and copied over into the recreated room.

I strongly recommend doing regular backups, or use "version control" tool when working on a project.


Quote from: Peegee on Fri 01/04/2022 10:18:52
I found that it was starting to be sensitive, weird, esoteric bugs and finally the level has crashed. Do I risk the same problem if I restart the level from zero, am I reaching the limits of the software?

It's hard to tell without knowing what bugs were there, it may be a good idea to pay attention to these, and when they happen find out why, or ask here.

Quote from: Peegee on Fri 01/04/2022 10:18:52
it's starting to take a lot of data, lines of code (10800 in the global script for example)

There got to be a technical limit for everything, but it's not defined by the number of lines, it's more complicated.
I've seen (much) larger global scripts than 10000 lines; but while it should work in theory, it is still better to split your code into multiple script modules, for convenience.
In any case, i think, if it were because of global script, it would be the global script not running correctly, not the room breaking up.

Peegee

Ok, thanks for that detailed answer. I will think about this function, version control, it can be useful. I must have made a bit rotten code, I would pay more attention.
  Luckily I had a recent backup. Sincerely, PG

SMF spam blocked by CleanTalk