My personal list of problems with AGS 4

Started by Monsieur OUXX, Thu 17/07/2025 21:16:43

Previous topic - Next topic

Monsieur OUXX

#20
ISSUE #7 : Catastrophic failure

This issue is probably not new, but reveals an old problem of AGS :
- I had an exception while saving the game. This time, the "out of memory" issue hit the JsonWriter.
- I told myself : "Nevermind, I'll close it and re-open it".
- When I re-opened AGS and the game, I had a message that over a thousand sprites were missing.
- I exited the game without saving and did a copy of my game folder.
- Then, I re-opened AGS and I helped the game going back to a healthy state by doing "File -> Restore all sprites from source".
- But then the sprites themselves were of course still missing.

NONE OF THE BACKUP FILES HELPED:
  - game.agf.bak was the exact same as game.agf
  - acsprset.spr had been partly overwritten by the corrupt data (incomplete file)

I'm not allowing myself to panic yet because I still have the files from before my AGS 4 upgrade. EDIT: I used the acsprset.spr file straight from after my AGS 3.6 upgrade, and it worked directly.

But I think this highlights the need of a better recovery mechanism :
-  If the saving crashes in the middle, then the critical files SHOULD NOT be overwritten. They should be swapped only after the save is successful.
- Or, at least, there should be more than one backup file generated. It's no longer 2005, we could have 10 of them (I'm exaggerating to make a point) and it would still use close to no resources.
 

Crimson Wizard

#21
There was this ticket opened a while back in regards to the project saving, maybe related:
https://github.com/adventuregamestudio/ags/issues/1177

Another ticket is related to changing sprite format storage:
https://github.com/adventuregamestudio/ags/issues/1281



Quote from: Monsieur OUXX on Fri 18/07/2025 18:26:43- Then, I re-opened AGS and I helped the game going back to a healthy state by doing "File -> Restore all sprites from source".
- But then the sprites themselves were of course still missing.

What do you mean? please elaborate. That operation is supposed to restore sprites in game so long as the sources are available. Were they available?

Quote from: Monsieur OUXX on Fri 18/07/2025 18:26:43- Or, at least, there should be more than one backup file generated. It's no longer 2005, we could have 10 of them (I'm exaggerating to make a point) and it would still use close to no resources.

Depends! I've seen game projects where sprite files were several GBs large.
We may have this as a setting in Editor Preferences though.

Monsieur OUXX

Quote from: Crimson Wizard on Sat 19/07/2025 19:27:05That operation is supposed to restore sprites in game so long as the sources are available. Were they available?
No, they were not -- that's what I meant. The project is about 10 years old, most of the sources are long gone and exist only inside the project's Sprites. The "of course" was not meant to be sarcastic :-)


Quote from: Monsieur OUXX on Fri 18/07/2025 18:26:43We may have this as a setting in Editor Preferences though.
Yes. Most people will want more than one backup for sure -- by googling, I can find several instances of people panicking because the backup got instantly overwritten by the new file (the corrupt file).

I think there should be two backup files, and people with large projects would go to the settings to reduce it to only one (not the other way around -- not one as default and people needing to increase to two).
 

Crimson Wizard

Quote from: Monsieur OUXX on Sat 19/07/2025 20:59:46
Quote from: Crimson Wizard on Sat 19/07/2025 19:27:05That operation is supposed to restore sprites in game so long as the sources are available. Were they available?
No, they were not -- that's what I meant. The project is about 10 years old, most of the sources are long gone and exist only inside the project's Sprites. The "of course" was not meant to be sarcastic :-)

If you like, then you can create new sources and bind your sprites to them.
Go to Sprite Manager, right click to bring a context menu, and choose "Create source files for sprites with missing...". That command does the "export sprites" operation combined with reassigning sprite's source path.

Crimson Wizard

The 4.0 Alpha 23 is released now, with 2 important fixes:
- Fixed memory leak in room compilation, so hopefully "out of memory" errors should not occur (unless you load too much stuff at once).
- Fixed error popup closing automatically if there's a "watch variables" panel.

SMF spam blocked by CleanTalk