Unable to load Sprite Set

Started by trevbot, Tue 10/03/2009 04:54:24

Previous topic - Next topic

trevbot

So, I went to save my project and it gave me an error that said it couldn't save the sprite data. I minimized AGS to check out the forum, and when I restored the window, I got this error:

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

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at GetRelativeSpriteHeight(Int32 )
   at AGS.Native.NativeMethods.GetRelativeSpriteHeight(Int32 spriteSlot)
   at AGS.Editor.NativeProxy.GetRelativeSpriteHeight(Int32 spriteSlot)
   at AGS.Editor.ObjectsEditorFilter.GetSpriteHeightForGameResolution(Int32 spriteSlot)
   at AGS.Editor.ObjectsEditorFilter.PaintToHDC(IntPtr hDC, RoomEditorState state)
   at AGS.Editor.RoomSettingsEditor.bufferedPanel1_Paint(Object sender, PaintEventArgs e)
   at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.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)"

So, I tried shutting the prgram and opening it again, and it says:

"Unable to load the sprite file ACSPRSET.SPR. The file may be missing, corrupt or may require a newer version of AGS."

What's worse, is that it won't load my project at all. Am I going to be able to recover my last update, or am I back to my last backup? (In this case: square one.)

I just downloaded AGS from the site two days ago, so I doubt the version is the problem.

-T

ps. There was no dump file made.

Dualnames

That reminds me of the error I recently posted about..
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

There should be a file called backup_acsprset.spr.
Rename that to acsprset.spr, overwriting the corrupt one.

But make a backup of the complete game dir first!

Pumaman

Following on from your previous thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37104

it seems like you have some serious system instability going on, and I wouldn't recommend trying to continue because it seems like you could easily lose all your work.

Is AGS the only application you're having problems with? Are you sure you haven't got a faulty RAM module or anything like that?

redspark

Sorry to dredge up an older thread but I just got this error too.  I'm using a computer that has not changed in 2 years for hardware.

I was just importing a new set of sprites for a speech animation when I went to run the game it blew up with this error.  I have 2GB of memory.  My ACSPRTSET file is about 25MB with around 1600 sprites. 

I was able to restore from the backup file and will backup the entire game folder before I continue.  However, I notice that the import acted a little strange.  I did a Quick Sprite import and brought in about 240 sprites or more in one shot.  The last two sprites were placed at the beginning instead of just the last one and a couple of the sprites were out of order.  This hasn't happened before as far as I know.

Thanks.

Pumaman

Which error did you get (there are two different ones in the first post of this thread)?

Did the error happen when you saved the game, or when you tried to load it the next time?

Was the game running when you tried to save it?

redspark

I got both errors.  After importing the sprites I tried to run the game which triggered the save, when the first error displayed about "Attempted to read or write protected memory".  I got a little window that said to send a report.  So I did.

I think I tried to save manually and got the error again and sent another report.  Then, I shutdown my game without saving and opened it up again.  That's when I got the spriteset missing/corrupt error.

The game was not running when I tried to save it.  Although I did do that earlier today by accident.  I'm certain I ran the game at least once after that though and didn't get an error then.

Pumaman

Hmm, looks like it wasn't able to save the sprite file for some reason.

The only thing that I know can lead to this is if the game is running when you save it, but in your case it's not this so I'm not sure yet what else it might be.

I'll do some further investigation and see if I can work out what might lead to this happening; in the meantime, if it happens again please do keep on sending the error reports to let me know about it.

redspark

The game is running from a USB pen drive.  Could that cause any problems because of the caching or IO speed?

Pumaman

Hmm, I suppose that's possible. AGS writes the sprite file then immediately tries to read it back, if there was some dodgy caching going on with the USB drive maybe it might interfere with this process.

Also, I presume the USB drive has plenty of free space and didn't fill up when it was trying to save?

redspark

Yeah.  Nearly a 1GB free on it.  No chance of it filling up.  I was thinking of the dodgy caching myself.  But I wasn't sure if that were possible.  I know it isn't suppose to be. :)

SMF spam blocked by CleanTalk