Author Topic: [BUG][PLAYER] Latest experimental fails on music fallback  (Read 2132 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
[BUG][PLAYER] Latest experimental fails on music fallback
« on: May 18, 2016, 04:09:55 AM »
BitBucket: https://bitbucket.org/namida42/neolemmixplayer/issues/28/issues-with-music-fallback

NOTE: This only occurs in the experimental versions. Fallback is working fine in V1.43n-F.

Play a level that specifies an exact track, while not having a copy of that track available.

Expected behaviour: NeoLemmix falls back to whatever track should occur based on the default rotation; only if that too is unavailable, it will play no music.
Actual behaviour: NeoLemmix does not play any music.

I'm fairly sure the cause is that line 1764 of LemGame.pas, NeoLemmix detects the missing file via this line throwing an exception, but it doesn't seem to be throwing one anymore. Indeed, adding code to unconditionally throw an exception in the "try...except" section here, causes the fallback to work properly (of course, in this case, it would always fall back, because the exception always occurs). I haven't looked for a more reliable (and non-unconditional) fix yet.
« Last Edit: June 14, 2016, 02:20:05 AM by namida »
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)

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [BUG][PLAYER] Latest experimental fails on music fallback
« Reply #1 on: May 18, 2016, 09:14:43 PM »
It is now fixed properly.

Is there any other place in the code, where NeoLemmix relies on exceptions being thrown? I usually remove any thrown exception that I encounter, so keeping such behaviour around is probably not the best idea...

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Latest experimental fails on music fallback
« Reply #2 on: May 19, 2016, 12:31:39 AM »
I'm not sure of anywhere else. However, it doesn't seem to be working correctly at all - the game ignores a custom specified track (even if it exists) if a music pack for the game doesn't exist, now.

Don't worry too much about this, as the changes I'm working on to file structure etc will involve changes to the music handling anyway. This post is more here to remind me to look at it when I'm up to that part.
« Last Edit: May 19, 2016, 02:10:30 PM by namida »
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)