Author Topic: [BUG][RC5-PLAYER] Game crashes during Don't panic level  (Read 2118 times)

0 Members and 1 Guest are viewing this topic.

Offline Minim

  • Posts: 1724
    • View Profile
[BUG][RC5-PLAYER] Game crashes during Don't panic level
« on: November 12, 2020, 05:56:27 PM »
Hi.

I'm trying to speed-solve "DON'T PANIC" from Redux but have encountered a problem. All I did was change the release rate at the start (twice) and dig the pipe with the first lemming. The game crashes as the lemming joins the digger pit.

NeoLemmix has kindly given me a replay after notifying me of this, before restarting the game. I don't understand what seems to be going on. Here's my replay.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #1 on: November 12, 2020, 07:02:08 PM »
I don't think it will make a difference but just in case: Is this the version of Redux included with RC5, or the version downloaded from the Redux topic? (If you're not sure - is Lunatic 2 "It's All A Matter Of Timing" or "The Boiler Room"?)

I'm delaying the release of 12.10 stable until I have investigated this, which I'll hopefully get a chance to do later today. If not, I'll be able to tomorrow.
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 Minim

  • Posts: 1724
    • View Profile
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #2 on: November 12, 2020, 07:14:32 PM »
I think it was on the Redux version of RC5, but more strangely, I can't seem to reproduce this bug.

The "Exception" file had been updated to reflect the bugs. Here are the last two instances, hidden in spoiler tags. Maybe it's a case of after the Exception appears, the game then starts working properly?

Spoiler (click to show/hide)
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #3 on: November 12, 2020, 09:24:31 PM »
Quote
I think it was on the Redux version of RC5

If possible, can you confirm this for sure by checking what level Lunatic 2 is in the copy you're using? (as noted above)
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #4 on: November 13, 2020, 05:15:13 AM »
This replay does not reproduce the issue for me on RC5 either.

Can you give any additional information? Don't worry if you can't answer all of these - any info is useful.

- Were you playing via normal level select, or Test Play mode from the editor?
- Had you been playing for a long time, or was this the first (or close to the first) level you played during that session? If you had been playing for a long session, did you notice any worsening lag and/or slower load times as the session went on?
- Since the last time you had been on the preview screen, had you restarted the level (via hotkey / skill panel button, not via exiting to postview), performed a backwards framestep, or loaded a saved state?
- Do you remember anything else in particular you were doing at the time? Eg. scrolling the level, using Clear Physics Mode, attempting to mouseover a lemming?
- Had you done anything outside of standard gameplay, shortly prior to this? This could include saving level images, a mass replay check, running a Cleanse Levels, etc.
- Was the game paused at the time?
- Anything else you can think of that might be helpful?

This could very well end up being a "needle in a haystack" bug with extremely specific conditions, so any information could be useful. Even if you're in doubt as to whether it's useful or not - the worst that can happen is that it doesn't achieve anything; it can't hurt. I won't delay 12.10 stable beyond tomorrow if I can't get any solid leads on this bug, unless I get additional reports that would suggest it's a frequent issue. The info in the spoiler tag suggests it may be related to a bitmap image in memory being loaded, created blank, or resized (as that's usually where DIB handle issues come up), though this is far from a sure thing.
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 Minim

  • Posts: 1724
    • View Profile
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #5 on: November 13, 2020, 07:55:11 AM »
Can you give any additional information? Don't worry if you can't answer all of these - any info is useful.

- Were you playing via normal level select, or Test Play mode from the editor?
- Had you been playing for a long time, or was this the first (or close to the first) level you played during that session? If you had been playing for a long session, did you notice any worsening lag and/or slower load times as the session went on?
- Since the last time you had been on the preview screen, had you restarted the level (via hotkey / skill panel button, not via exiting to postview), performed a backwards framestep, or loaded a saved state?
- Do you remember anything else in particular you were doing at the time? Eg. scrolling the level, using Clear Physics Mode, attempting to mouseover a lemming?
- Had you done anything outside of standard gameplay, shortly prior to this? This could include saving level images, a mass replay check, running a Cleanse Levels, etc.
- Was the game paused at the time?
- Anything else you can think of that might be helpful?

- I was using Normal Level Select.
- I do remember playing for quite a while, as I repeatedly attempted to solve Lunatic 2's "The Boiler Room" before this one. The only possible thing left that I can think of is that it might be an "Out Of Memory" or "CPU Overload" bug. "Playing for a while" can't be reproduced easily though, though that might be the only thing lift to do. ;)
- Can't remember if I did any of these.
- I think I was mousing over a lemming, but I can't seem to reproduce it using this trick.
- I haven't done anything outside of standard gameplay. I do remember loading a replay which isn't from this level onto it though. Also, I had completed the level beforehand using a replay from the last stable version (NX 12.09). Maybe when I got back into this is when I discovered the bug.

So in short, I still cannot reproduce the bug as it stands. The CRC by the way is CRC 374689907 if that's of any use.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #6 on: November 13, 2020, 07:06:26 PM »
This could be a very nasty one to track down. It's likely that the actual bug is entirely elsewhere - it seems to be what's known as a "memory leak", in really simple terms, this is when data gets loaded into memory, but not removed when it's no longer needed. This builds up until NL cannot get any more memory - or in this case, cannot assign any more DIB handles - at which point it crashes and terminates (which in turn releases all memory used by NL, so it won't leave lingering effects).

This is also why it's often a nightmare to track down. As it seems to require long playing sessions - and even then, not always, as no one else is reporting this - and I have no meaningful leads at this point, I won't delay the release for very long for this - I'll take a quick look and see if I can find anything relevant, but if not, it's more likely to be fixed in a later 12.10.1 update.
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #7 on: November 13, 2020, 07:17:14 PM »
Can confirm there's definitely a memory leak somewhere. It does not seem to depend what levels are played, nor how long they are played for - what appears at this stage is that it's happening on the preview screen. If you open the preview screen, and (using the arrow keys) move back and forwards between two levels, memory usage will slowly increase. It happens in 12.9.4, so is not a result of new code in 12.10.X.
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #8 on: November 13, 2020, 10:44:48 PM »
In one cycle of Preview -> Ingame -> Postview -> Preview, 7 TBitmap32's are created that are not freed, regardless of play duration or restarts. Four of these are on the preview screen, three are in-game - I have conclusively determined that none are on the postview screen.

Those on the preview screen relate to the loading of lemming sprites. Those in-game are very likely to, at least in part, be from the same, but I cannot say for sure yet. This will almost certianly be feasible to fix for V12.10.0.
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #9 on: November 13, 2020, 11:01:02 PM »
4 of the 7 leaky TBitmap32's are fixed in commit 5f40966 - the four originating from the preview screen. It actually turned out, as per a separate bug report, it being four was a result of the lemming sprites being loaded twice. This is a separate bug that will be fixed at a later date, as it has little significance - there were two leaks each time they were loaded.

The in-game ones are not related to this and are still under investigation. Even if these cannot be found quickly enough, the fix so far more than doubles how long a session would need to last before this bug occurs, so it's still a significant improvement.

EDIT: The in-game leaks are confirmed to be linked to the skill panel - they go away when I dummy the panel out altogether. I still need to narrow down the exact cause, though.
« Last Edit: November 13, 2020, 11:19:06 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG][RC5-PLAYER] Game crashes during Don't panic level
« Reply #10 on: November 13, 2020, 11:36:51 PM »
Ingame leaks fixed in commit b324f8f. I have also confirmed there are no additional leaks exclusive to high-res mode.

It is always possible further leaks exist elsewhere - NeoLemmix's code is quite a mess, and Delphi is not garbage-collected, but that should at least be all the TBitmap32 leaks taken care of - or at least those that are likely to occur during normal gameplay.
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)