Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: IchoTolot on February 26, 2021, 10:01:50 PM

Title: [BUG][Player] Buttons are getting pushed opon loading replay
Post by: IchoTolot on February 26, 2021, 10:01:50 PM
Weird bug with buttons and locked exits.

1.) Select a locked exit level (my R2 level from contest 22 works).
2.) When entering the level press pause while the screen is still black.
3.) Load a replay for the level and proceed.

--> All buttons are being pushed down and the exits open visually. Internally they are still locked and the level cannot be completed anymore --> buttons already pushed and exits are internally locked.

Example: https://www.youtube.com/watch?v=5db1Lp-Csoo 

Watch the section with my R2 level.
Title: Re: [BUG][Player] Buttons are getting pushed opon loading replay
Post by: kaywhyn on February 26, 2021, 11:11:44 PM
Confirmed, as I can reproduce the bug by following the steps that Icho details in the bug report. The important thing is that there must be no frame advancement when the level loads in combination with pressing the pause hotkey while on the black screen. If you press pause while the screen is black, unpause after the level has loaded to allow some frame advancement, and then quickly pause the level again, then finally load the replay, there is no problem at all.

The level I noticed this happening has no entrance, but I have confirmed the bug happens in levels with entrances as well. Also, the bug happens with Icho's level in my video, but I have confirmed that it happens in the other R2 contest levels as well, and so the problem is not tied to the tileset. Finally, I have checked that this happens in v12.10.3, so this bug has been happening for several NL versions. Luckily, no replay breakages, but still something to report. Thanks, Icho, for doing so ;)
Title: Re: [BUG][Player] Buttons are getting pushed opon loading replay
Post by: namida on April 24, 2021, 02:57:03 AM
Fixed in commit 8ed91de. I can't figure out why it happens, but I was able to figure out what part of the code was causing it - the code for loading the saved states used by backwards frameskips. For some reason, pausing on frame 0 during the initial load (not after a reset / backwards skip) then loading a replay caused issues - but as it happens, in this situation there's no actual need to load the saved state in the first place, so I just made it not try to do so.