getSpriteAsBitmap32bit: Unable to find sprite 0

Started by Toxicmaboroshi, Sat 18/07/2009 17:33:31

Previous topic - Next topic

Toxicmaboroshi

Hi

I have received this message:

getSpriteAsBitmap32bit: Unable to find sprite 0

It says if you are unable to resolve the error post on the forum.

My game save will not open...so I am unable rectify any possible problem. Does anyone know how to resolve this issue so I can get my game back?


Thanks

NsMn

Solution: Delete the file acsesprite (or something like that) and rename the file backup_acsesprite (or so) to only acsesprite (I won't comment it again :P ). Then try to load the game again.

Toxicmaboroshi

Quote from: NsMn on Sat 18/07/2009 17:52:01
Solution: Delete the file acsesprite (or something like that) and rename the file backup_acsesprite (or so) to only acsesprite (I won't comment it again :P ). Then try to load the game again.


Thanks for replying, I have found the file acsprset in the game folder, however I can not find the back up file which you describe? I guess it would be in teh same place as the original file?

Thanks

Toxicmaboroshi

#3
After not finding the backup file in he folder I replaced the old file...

I now have a whole new error message......a 'square', hexadecimal value 0x06, is an invalid characer. Line 1, position 1.

***PLEASE IGNORE THIS SECTION THIS HAS BEEN RESOLVED****

The below error continues:


getSpriteAsBitmap32bit: Unable to find sprite 0

Thanks

Pumaman

What happened before you saw this message for the first time? Was there an error saving the game before it started doing this?

Toxicmaboroshi

Quote from: Pumaman on Sat 18/07/2009 19:54:19
What happened before you saw this message for the first time? Was there an error saving the game before it started doing this?

I imported a new sprite and applied it to an inventory item, I then ran the game to see what it looked like in game. The game ran its usual loading screen and then stopped throwing up the error:

getSpriteAsBitmap32bit: Unable to find sprite 0

I then wasn't able to save the game, I thought if I reload it from the last place I saved it would be okay, but I continued to get the above getSprite..... message.

Thanks

Pumaman

It sounds like your game's sprite file is corrupt, though I think I've only seen this happen before where there was some sort of error saving the game, and then this message started to come up whenever you tried to load it in future.

If you can zip up and upload your game folder I can take a look, though it's likely you'll need to restore from a previous backup version.

Did you use the Send Error Report button when this message first appeared?
Which version of AGS are you running?

Toxicmaboroshi

Quote from: Pumaman on Sun 19/07/2009 19:49:34
It sounds like your game's sprite file is corrupt, though I think I've only seen this happen before where there was some sort of error saving the game, and then this message started to come up whenever you tried to load it in future.

If you can zip up and upload your game folder I can take a look, though it's likely you'll need to restore from a previous backup version.

Did you use the Send Error Report button when this message first appeared?
Which version of AGS are you running?


Thinking about it, it may have been when I saved it? I often press save before running the game to test it.

I didn't have a back up version, so I found the acsprset file in the demo game and loaded it in. This allowed me to open my game, all the coding was still there but all the graphics had gone. So I started again added everything back in...but now I have been given the error message again! So I am not sure what I am doing but it doesn't like something! I am not sure if the resolutions are too big for the game?

I did report it the first time as AGS offered me to report the bug.

I think I am using the latest version of AGS as I downloaded it only a week ago. I'll try to zip up the file and post it as soon as I can.

Thanks

Pumaman

Oh, if you've replaced the sprite file with one from the demo game I wouldn't expect that to work.

Is it possible you tried to save the game in the editor while it was running? This is a known problem that can break the sprite file, and in the next version the Save option will be disabled while you're running the game.

Shane 'ProgZmax' Stevens

CJ - Instead of disabling it would it be better to have it auto-close the game and then save?  Sometimes people click save because they're worried something bad is going to happen (power outage, crash) so this would satisfy emergencies and protect the sprite file.  Just a thought.

Pumaman

Well, I think that would make people complain that it had closed the game they were in the middle of debugging .. besides, in order to run the game it will have had to save it at that point, and you're unlikely to be making extensive changes in one debugging session.

Shane 'ProgZmax' Stevens


Toxicmaboroshi

I am fairly sure I saved the game before running it. However, I built the same game a second time because of the crash...and it happened again and that time I definately didn't save whilst the game was running. Weirdly though it let me add more than it did last time before crashing?

Could it be due to file size? Or the resolution the pictures are in?

Pumaman

Is the game folder on your hard drive or are you trying to run it off a USB stick or something? I seem to remember somebody having strange problems when they were trying to develop the game on a USB drive...

Toxicmaboroshi

No, none of my stuff is on remote or extended storage it is all soted on the internal hard drive. It is just really strange how it has happened twice now?

Pumaman

Hmm yes, you shoudln't get this error once, let alone twice... I presume you're running the latest version of AGS?

When this error happens, is there still a file called ACSPRSET.SPR in the game folder?

Toxicmaboroshi

I am indeed using the latest version, downloaded the new one no more than a few weeks ago?

Yes that file is present when the error happens, there is no "backup" file of the same name when the error occurs.

Thanks

Pumaman

I looked through the Error Reports log and found this, which was sent at about the time of your original post:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at save_sprites(Boolean )
   at AGS.Native.NativeMethods.SaveGame(Game game)
   at AGS.Editor.NativeProxy.SaveGame(Game game)
   at AGS.Editor.AGSEditor.SaveGameFilesProcess(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()

Do you remember if this is the first error message that you got? If so, that indicates that it crashed while trying to save the sprite file (and therefore leaving a corrupt sprite file which couldn't be opened in future, leading to the Unable To Find Sprite 0 error).

The puzzling thing is why it crashed saving the file ... would it be possible to upload the image file that you had just imported at the time? If you import it again now, does it cause the crash again or does it work fine?

Toxicmaboroshi

That could well be the error message, I didn't read it too closely but it sounds about right for the error that I had.

I have to be honest I couldn't tell you which sprite it was.....I imported several all at the same time. A number for a walk view, several as objects and invent items?

I guess the only thing I could do is import everything one by one and press save each time to see if it catches a certain file when crashing?

Although I think the second time it crashed, I had imported more than the first time?

Thanks

Pumaman

Strange, has anyone else had any problems like this?

SMF spam blocked by CleanTalk