Author Topic: [BUG][PLAYER] Program crashes on startup if level file missing  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

Offline Crane

  • Posts: 1020
    • View Profile
[BUG][PLAYER] Program crashes on startup if level file missing
« on: February 26, 2023, 09:48:29 AM »
If you delete or rename etc. the file that corresponds to the level that was last played when the program closes (so it is the one that's selected when you next start up), the program crashes with the message "An error occured while trying to save data.", and then when that dialog box is cleared, the standard Delphi exception message appears: "Exception TIconImage in module NeoLemmix.exe at 003252EA" before terminating.

This should be handled more cleanly, either displaying a warning or silently ignoring it and setting the last played level to something default.

Online namida

  • Administrator
  • Posts: 12243
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Program crashes on startup if level file missing
« Reply #1 on: February 26, 2023, 06:46:43 PM »
I'm sure I remember coding a fallback for specifically this case; with the behavior being that it would get as close as it could. (ie: Let's say the last level played was a level in Tricky of Orig; if that level is now missing, it'll go to the first unsolved level, or maybe just the first level full stop, of Tricky; if the entire Tricky rank is missing or has no levels, it'll go to the first of Orig as a whole; and if the entire pack is gone, just to the first level you have in your levels folder)

It'd seem though, either I only thought about doing this, or it broke at some point.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)