Sprite file (acsprset.spr) contained less sprites...

Started by MSNBrianC, Tue 21/01/2025 17:59:31

Previous topic - Next topic

MSNBrianC

one of my students has been experiencing this error almost every time they work on their project. Every time it happens, the student STARTS OVER FROM SCRATCH, and does enough work to make their game function. They save their work, then when they open it the next day, they see this error and all (or most) of their sprites are black rectangles.

I would love to be able to tell this student what they're doing wrong, but I have no idea what they do outside of the classroom. This error has never happened to me before, but I've only been using it since last Summer.

Does anyone have any idea why this keeps happening to this one student?
(image of error attached)

Text of the error message states:

Sprite file (acsprset.spr) contained less sprites than the game prject referenced (109 sprites were missing). This could happen if it was not saved properly last time. Some sprites could be missing actual images. You may try restoring them by reimporting from the source files.



Khris

Is it possible their hard drive is full to the brim? Or do the students store their games on flash drives? Maybe they pull out the drive without safely removing it first?

The spriteset file is one of the biggest files in a game, so either explanation seems plausible to me.

Do they bring their own laptops? Or use school owned devices?

Anyway, it's almost certainly either a) a hardware issue with the specific device or b) user error.

Crimson Wizard

#2
Quote from: MSNBrianC on Tue 21/01/2025 17:59:31Every time it happens, the student STARTS OVER FROM SCRATCH, and does enough work to make their game function. They save their work, then when they open it the next day, they see this error and all (or most) of their sprites are black rectangles.

That is horrible. There's usually no reason to start from scratch.

1. AGS keeps sprite file backup, called "backup_acsprset.spr". You may rename the file to "acsprset.spr", and try loading the game.
2. AGS has a function called "Restore all sprites from sources", it's located in File menu and also in the Sprite manager's context menu. This function completely restores a sprite file so long as the original images (from which you have imported the sprites) are present on their locations on disk. For this reason it's advised to keep all original images somewhere in a game project's subfolder, then it will work even if you move the project folder elsewhere (to another computer).
3. Lastly, one can make a backup, either as an archive, or use a source control tool (SVN, git, etc).

Regarding the problem itself:
1. Does this happen only next day? have they tried reopening the project right after saving and exiting AGS?
2. Where on disk is the project located (user documents, or elsewhere)? is it a hard-drive or removable device like a flash drive?

MSNBrianC

I should have stated earlier that this student has intentionally chosen to NOT use Github Desktop for version control. I typically just make them do it, but this student managed to avoid it completely, even when I was sitting down with them, creating the repository for them.

**I didn't know about the backup sprite sheet! I'll try that.

**I also didn't know about the "restore all sprites from sources" function, but now I see it right there under "file".

This student works on the school computer, and we typically have a lot of space, enough to run lots of Unreal Engine projects. BUT, maybe the student is accidentally saving to their one drive? I know they're not using a jump drive because they only feel comfortable working on the one specific lab computer.

I think what happens is it turns black a moment after the student finishes and saves at the end of a long night. I once got a video from this student showing the game, and then ten minutes later a worried email about the sprites turning black again.

I'm going to check the disk space on the computers they work on, and see if I can do the restore function. THANKS!!!!

Let’s Get Cooking

I have had the same issue more than once recently. It definitely happens when saving to One Drive but also I think happened when I left ags running and computer went into sleep mode.

In my case I found the backup file was also corrupted so I reimported all sprites.
Play ANOMALY RESOLUTION on itch - a split-screen retro arcade shoot 'em up.

eri0o

Just to check, when you say OneDrive, did you edit in one computer and later edit in another that was linked through OneDrive? Just because I had (multiple times) files that weren't yet synced by OneDrive even after waiting a long time before turning one PC off - in my situation I have two different laptops that run Win11 and are synced by OneDrive. I don't use AGS in these computers though.

Let’s Get Cooking

I believe it happened when I moved the directory to the OneDrive Documents folder (with intention to make available on my other computer) but when I reopened the project from that folder on the original system, all sprites were blacked out and the acsprset and backup were both reduced in file size.  I replaced acsprset with an earlier version saved locally and the then reimported any more recent sprites.

I did not learn the first time and did the same thing again and had same issue, so have now stopped using OneDrive.

I suppose it could be that I am interrupting the process somehow, just interesting that I had very similar experience to the problem described in the original post and they also mentioned OneDrive may have been used.  I am now avoiding it!

Play ANOMALY RESOLUTION on itch - a split-screen retro arcade shoot 'em up.

MSNBrianC

Just to follow up:

1. The computer drive had PLENTY of space.
2. The student was NOT using their One Drive.
3. Doing file>restore from source did not work
4. The backup sprite sheet was TINY like 7 kb, and obviously did not work when used.

I really really want to find out what the student was doing. I am always so intrigued when a student shows me an error that I have never seen before.

Thanks for all of your help, everyone!!!

Crimson Wizard

#8
Quote from: MSNBrianC on Wed 22/01/2025 17:29:443. Doing file>restore from source did not work

Could you elaborate on that, what happened? Were there any errors, or they just were not replaced?

How does the user import sprites, and where from, is it from files, or using clipboard?

Note that you may select any game sprite, and check "SourceFile" in its properties.

Quote from: MSNBrianC on Wed 22/01/2025 17:29:444. The backup sprite sheet was TINY like 7 kb, and obviously did not work when used.

Besides a possibility of error, this may mean that there were no game re-saves. Like, the user only saved the game after importing all sprites. So previous backed up version contained only initial ones, for example.

eri0o

How are images imported in the AGS Editor? Is the user just pasting from the clipboard?

Spoiler
Also I wouldn't mind if you ever wrote like a big long post explaining the experience of using AGS in a classroom and the reception from students, impressions that they mentioned and all that. I find this idea super interesting. If you have given more than one class even better, if you can think about different things and common things different classes may have mentioned or experienced using AGS.
[close]

MSNBrianC

Quote from: Crimson Wizard on Wed 22/01/2025 18:23:01Could you elaborate on that, what happened? Were there any errors, or they just were not replaced?

I clicked File > restore... and nothing happened... like, I didn't notice the any popup windows or any process. Then I checked the sprites and they were all the same.

Quote from: Crimson Wizard on Wed 22/01/2025 18:23:01How does the user import sprites, and where from, is it from files, or using clipboard?

Ohhhh now I'm wondering if the student did something like copy/pasting. I have no idea, the student was working on it outside of class.

Quote from: Crimson Wizard on Wed 22/01/2025 18:23:01this may mean that there were no game re-saves
Again, Oohhhhhhhh, I now bet this student wasn't saving at all, and was just pushing through each time until the end...
 

eri0o

@Crimson Wizard , hey, just had an idea here, what if when pasting from the clipboard we added a mark in somewhere in the sprite list and then when restoring it could have a message - or output to the output window or a file - that says "sprites 3,4,5 can't be restored because their sources are from the clipboard", or just something like it?

Snarky

Quote from: MSNBrianC on Wed 22/01/2025 00:32:34I should have stated earlier that this student has intentionally chosen to NOT use Github Desktop for version control. I typically just make them do it, but this student managed to avoid it completely, even when I was sitting down with them, creating the repository for them.

With that in mind, I would suspect that the student is deliberately doing something to cause this problem, and is lying to you about it, in order to get out of an assignment or to hide the fact that they are cheating.

MSNBrianC

More weird update:

I checked the student's computer profile. There are two project folders. One of them has all black sprites, the other shows the proper sprites.

The location for the black sprites shows the EXACT SAME LOCATION as the locations for the project with proper sprites.

As in, there is a cardboard box sprite, and for both projects the sprite location is set to the exact same C drive images location. It's just that for one of them, all of the sprites are black, and in the other, all of the sprites show up.

I tried to reimport from source, and nothing seemed to happen (as described above). So I'm still at a loss for how or why all of the sprites are black, if for both projects, they all point to the same sprites!

Quote from: Snarky on Thu 23/01/2025 12:13:33I would suspect that the student is deliberately doing something to cause this problem, and is lying to you about it, in order to get out of an assignment

I definitely had that thought, but I am very confident that the student is not cheating based on what I've seen.
 

Crimson Wizard

Quote from: eri0o on Thu 23/01/2025 11:02:56@Crimson Wizard , hey, just had an idea here, what if when pasting from the clipboard we added a mark in somewhere in the sprite list and then when restoring it could have a message - or output to the output window or a file - that says "sprites 3,4,5 can't be restored because their sources are from the clipboard", or just something like it?

Sprites from clipboard are identified by not having a SourceFile set. Strictly speaking, it does not matter why it's not set, or where it came from, if there's no file path, then it cannot be restored.

Crimson Wizard

Quote from: MSNBrianC on Thu 23/01/2025 17:06:14The location for the black sprites shows the EXACT SAME LOCATION as the locations for the project with proper sprites.

As in, there is a cardboard box sprite, and for both projects the sprite location is set to the exact same C drive images location. It's just that for one of them, all of the sprites are black, and in the other, all of the sprites show up.

I tried to reimport from source, and nothing seemed to happen (as described above). So I'm still at a loss for how or why all of the sprites are black, if for both projects, they all point to the same sprites!

This is quite strange, and I do not have a ready explanation.

Would it be acceptable for you to send us those two projects for analysis, along with the original images that it mentions?

MSNBrianC

Quote from: Crimson Wizard on Thu 23/01/2025 19:04:30Would it be acceptable for you to send us those two projects for analysis, along with the original images that it mentions?

Sure, I'll get on that tomorrow :)

SMF spam blocked by CleanTalk