Various crashes when files are missing [BUG] [NF-PLAYER]

Started by Nepster, June 09, 2017, 08:27:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nepster

The new formats experimental player does not handle missing files well at all. This is tested with version 11.14.19_c474af8.

1) Missing bass.dll
The error message reads "An error occured while trying to save data", which is completely misleading. Actually this error message occurs twice, before NeoLemmix.exe crashed completely with an EAccessViolation. Even after accepting this error message, NeoLemmix does not shut down properly, but has to quit via the task manager.

2) Missing data/particles.dat
Again NeoLemmix.exe crashes first with just a message "NeoLemmix no longer works // Quit NeoLemmix // Debug NeoLemmix" due to an unhandled exception. Only after trying to quit NeoLemmix the actual error message appears, which tells us what file is missing.

3) Missing level files
If either the folder "levels" is missing completely, or if it is missing, NeoLemmix produces an Access error at the module "NeoLemmix.exe", without telling me anything useful. A black form appears before this happens, but the main menu does not get displayed.

4) Missing styles folder
If no styles folder is present, the game reacts as in error 2) and complains about not being able to find "styles\deafult\lemmings\scheme.nxmi". I did not try to list all subfolders resp. files that have to be present in the styles folder in order to avoid any such errors.

In all cases, I would expect that the missing files create handles exceptions, that produce error messages telling me exactly what files are missing, and then exit NeoLemmix.exe nicely.

Do not treat this as a complete list of errors due to missing files. These are just the problems I encountered when I tried updating to a new version by replacing the NeoLemmix.exe file, while keeping the other stuff of an older new-format version.

namida

1. This is not completely critical. Being unable to access BASS.DLL should not prevent NeoLemmix from running. It will, however, mean that no sound will play (as BASS.DLL is responsible for 98% of sound handling).
2. Particles.dat should probably be built into the EXE anyway, as it's just constant data that shouldn't be changed. I simply moved it to external because loading internal files wasn't working at one point; it should be possible to get it working again now, but I haven't done so yet.
3. Again, not critical. NeoLemmix should simply create the folder.
4. This one is critical, as NeoLemmix needs some kind of lemming sprites in order to run. Need to implement a tidy exit when it's not found.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

1 is fixed. NeoLemmix will display an error message if BASS.DLL isn't found (or fails to load), but will otherwise continue properly, albeit with no sound or music.

3 is not as straightforward as I initially thought. NeoLemmix essentially needs to have a "current level" at all times; if only an empty "levels" folder exists, it cannot find one and thus throws a fit. This will need some more complex changes than just autocreating the "levels" folder. (Or alternatively, it could create it and put a placeholder level there, but this feels messy.)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)