Unhandled error

Started by AnasAbdin, Sun 11/09/2011 05:03:19

Previous topic - Next topic

AnasAbdin

I received the following while building the game:


The complete text is this:

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.2.1.111

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  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.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
  at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
  at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
  at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
  at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
  at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
  at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
  at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
  at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
  at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
  at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
  at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  at System.Windows.Forms.ToolStrip.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)


then this:


please don't tell me my 2 months efforts creating 52 highres rooms with more than a thousand sprites are just gone  ???

I thought my ram(s) went bad.. switched them still same error, copied my game files into another AGSless PC, installed AGS, ran the game, same error after EXACTLY building room 25 (even my home PC which I'm developing the game in showed the error after room 25...) it worked fine last night, I didn't face that problem at all, I had 52 rooms since a week and all the addition I was making was coding more puzzles, adding a few sprites...


Edit: I tried the following:
Deleted room 25 (which causes the error when built) and still got the same error.
Deleted rooms 24 and 26 (just in case...) still same error..
Deleted the final rooms I've added 52, 51, 50... same..
now AGS won't even close, when I try to exit it the application the error msg appears and won't allow me to exit  :(

AnasAbdin

i fixed it! I traced my rooms scripts one by one and nothing was wrong. Then i traced the rooms thru the editor until room 27.. AGS didn't open the room and instead gave the error. I copied the room's script and deleted the room, created a new  room with the same number, used the same code, same image, had to re-draw walkable and walkbehinds.. But everything worked fine!

This is my humble explanation:
while building, AGS encountered bad ram, crashed the room..

AGS rocks :* and Anastronaut is back to his space adventure ^^ i hope this whole self-solved drama may help other AGSers whenever encoutering such an issue.

hedgefield

That is heart-stopping stuff right there. I've seen similar errors a few times during building, mainly because Dropbox sometimes tries to get its grubby paws on the exe before it is done building. Usually building again right afterwards solves the problem.

Remember: THOU SHALT ALWAYS BACKUP. ;)

AnasAbdin

Quote from: hedgefield on Sun 11/09/2011 20:52:06
That is heart-stopping stuff right there.

Thanx alot for the sympathy!! I was about to collapse! lol

Quote from: hedgefield on Sun 11/09/2011 20:52:06
THOU SHALT ALWAYS BACKUP. ;)

are you kiddin me? each time I close AGS I copy the game into 2 different external HDs and a flashy!

SMF spam blocked by CleanTalk