Author Topic: Loap crashes when trying to play a level  (Read 5127 times)

0 Members and 1 Guest are viewing this topic.

Offline fran5678can

  • hi uhh... call me lemmy. i'm a fan of lemmings and really enjoy those games.
  • Posts: 6
    • View Profile
Loap crashes when trying to play a level
« on: January 26, 2022, 10:32:19 PM »
Loap crashes when i try playing a level, idk what causes this.
"loap crash.png" is a picture of 0.0.8.0 crashing.
Is anyone able to help?
call me lemmy

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #1 on: January 27, 2022, 01:04:54 AM »
Does this happen with any level or only particular ones? Also, do you happen to know what GPU you have?

EDIT: Also, just to be sure, did you build from source or download from the topic? If from source, which exact commit?

EDIT: One further thought; if you're copying level files from the official game, you'll need to decompress the LEVEL.xxx files (the BLK.xxx files aren't compressed). L3DEdit can do this. I really should add the decompression functionality to Loap... Actually, if this was the issue, even the level select screen wouldn't load properly.
« Last Edit: January 27, 2022, 09:00:36 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 fran5678can

  • hi uhh... call me lemmy. i'm a fan of lemmings and really enjoy those games.
  • Posts: 6
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #2 on: January 27, 2022, 02:40:16 PM »
Does this happen with any level or only particular ones? Also, do you happen to know what GPU you have?

EDIT: Also, just to be sure, did you build from source or download from the topic? If from source, which exact commit?

EDIT: One further thought; if you're copying level files from the official game, you'll need to decompress the LEVEL.xxx files (the BLK.xxx files aren't compressed). L3DEdit can do this. I really should add the decompression functionality to Loap... Actually, if this was the issue, even the level select screen wouldn't load properly.
Crashes with any level. I downloaded using the download links from the topic.
call me lemmy

Offline fran5678can

  • hi uhh... call me lemmy. i'm a fan of lemmings and really enjoy those games.
  • Posts: 6
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #3 on: January 27, 2022, 03:13:26 PM »
Updated to 0.0.9.0, still having the same issue.
call me lemmy

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #4 on: January 27, 2022, 06:22:55 PM »
No one else has reported similar issues, so I'm a bit lost here as to what's causing it.

Just in case - can you try completely wiping your Loap folder, and setting up a new copy of the game (ie: without any leftover files from past versions)? This (a leftover file from past versions) isn't likely to be the issue, but let's rule it out just in case.

Just to be 100% sure on this - so what's happening is you start up Loap, you hear the "Let's go" sound and the title screen music plays, and you can move the mouse around on the menu screen, but when you click a level, it crashes (not earlier)? Do you hear that level's music start and/or another "Let's go" sound?

I assume you don't know what your GPU is? I've done some testing and can pretty much rule out that GPU memory is an issue (as even on complex levels, Loap seems to max out at well under 256MB - and usually under 128MB - of VRAM usage), but if your GPU is an older one, maybe there's a compatibility issue. If you don't know exactly what GPU you have, do you at least know roughly how old your PC is?
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 NieSch

  • Posts: 387
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #5 on: January 29, 2022, 04:09:12 PM »
I have a new PC and I have exactly the same problem. This is what happens:

(...) start up Loap, you hear the "Let's go" sound and the title screen music plays, and you can move the mouse around on the menu screen, but when you click a level, it crashes
My NeoLemmix packs: All You Need Is Lemmings - Long Live Lemmings! - Yippee! More Lemmings
SuperLemmix: Tomb Rodents featuring Lemmina Croft

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #6 on: January 29, 2022, 11:50:07 PM »
Could both of you try this version of Loap? Install to a fresh folder. Don't forget the music (music download; or you can just copy the "music" folder from your existing copy of Loap).

https://www.neolemmix.com/download.php?id=539

It'll create log text files (just in the main Loap folder); could you share those? Hopefully this will shed some light on why, or at least when (to the degree of "roughly which step of loading the preview screen"), it's crashing. Except for creating these log files, it should be identical to 0.0.9.0.

EDIT: I've now released Loap 0.0.10.0; this build contains the logging functionality too (with one difference: logs will go in a "log" subfolder). Please use that to get a log instead.
« Last Edit: January 30, 2022, 06:52:52 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 NieSch

  • Posts: 387
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #7 on: January 30, 2022, 10:42:51 AM »
Attached is the log file.
My NeoLemmix packs: All You Need Is Lemmings - Long Live Lemmings! - Yippee! More Lemmings
SuperLemmix: Tomb Rodents featuring Lemmina Croft

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #8 on: January 30, 2022, 08:40:15 PM »
Awesome - didn't give me much insight into why the crash is happening, but it did indeed at least confirm where it's happening - the crash is for some reason occuring during the loading of block models.

Now, I'll get another version up later with more-targetted logging on the block model loading specifically, and see if we can figure out exactly what's making it crash.

@Fran - I'd still appreciate if you could upload your log too, just in case it's a situation where you and Niesch are experiencing the same symptom for different reasons.
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: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #9 on: February 01, 2022, 07:36:19 AM »
Could you get another log using this version: https://www.neolemmix.com/download.php?id=541 (New logging build in later post)

Music not included; download from normal source or copy from existing installation.

This version should get more specific info on why the block loading is crashing, or failing that, at least a much more precise "when".
« Last Edit: February 01, 2022, 06:54:29 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 NieSch

  • Posts: 387
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #10 on: February 01, 2022, 08:58:53 AM »
New log:
My NeoLemmix packs: All You Need Is Lemmings - Long Live Lemmings! - Yippee! More Lemmings
SuperLemmix: Tomb Rodents featuring Lemmina Croft

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #11 on: February 01, 2022, 06:54:17 PM »
Okay, that's weird as fuck.

To give a brief explanation - when loading the block models, Loap splits them into the individual faces. It uses the "normals" of the vertices to determine which polygons belong to which face. Often it's obvious, because the normals will be zero on two axes and 1 or -1 on a third; but for faces that are sloped (or the deflector block's diagonal face), it's trickier, and in some cases ambiguous, so the results are hardcoded. What's happening is that, for some reason, Loap is trying to look up an ambiguous-case result for the regular block slab shape (basically a cube, but only 1/4 the height compared to the other two dimensions), which does not have any such faces and thus should never go to that lookup, therefore doesn't have results defined.

I really don't have any idea why this would happen at all, let alone only on some PCs, so this is going to be a real pain in the ass to fix... at least at this point, I know exactly which function the issue is occurring in, as well as the immediate cause of the crash (but not the deeper factors leading to it). Next step, more logging. This build should give two additional pieces of info in particular: The raw text that Loap is reading from the file (in case this is becoming corrupt somewhere along the line), and what values are being passed to the "determine face" function (in case the file's raw data is correct but something is altering the values somewhere).

Also as a stab in the dark: If you know, what CPU do you have? In particular, are you running on regular x86_64 hardware (ie: Intel or AMD), or are you using an ARM-based (Qualcomm / Snapdragon) PC? Likewise, are you running on actual Windows, or are you using Linux + WINE?

New build: https://www.neolemmix.com/download.php?id=542
« Last Edit: February 01, 2022, 07:10:00 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 NieSch

  • Posts: 387
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #12 on: February 01, 2022, 08:18:47 PM »
Windows 10 Home
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
x64

New log:
My NeoLemmix packs: All You Need Is Lemmings - Long Live Lemmings! - Yippee! More Lemmings
SuperLemmix: Tomb Rodents featuring Lemmina Croft

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Loap crashes when trying to play a level
« Reply #13 on: February 02, 2022, 01:02:00 AM »
Is your PC's language set to one that ordinarily would use a comma rather than a period as a decimal seperator, by any chance?

@Fran - same question to you?

I ask this because it seems to be turning this input:

Quote
v 0.000000 1.000000 0.250000
...
vt 0.000000 1.000000
...
vn 0.0000 0.0000 1.0000

into this value internally:

Quote
BlockModel >  Processing vertex: Pos: {X:0 Y:1000000 Z:250000} // Nor: {X:0 Y:0 Z:10000} // Tex: {X:0 Y:-999999}

At this point, it doesn't expect a value of 10000 (instead of something in the range -1 .. 1) for the normal, and thus crashes. Even if it didn't, blocks would be ridiculously oversized and have texture oddities in-game due to this.


Loap 0.0.11.0 will have a fix that, if my guess (re: language settings) is correct, should fix this issue for both of you.
« Last Edit: February 02, 2022, 01:21:19 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 NieSch

  • Posts: 387
    • View Profile
Re: Loap crashes when trying to play a level
« Reply #14 on: February 02, 2022, 08:43:54 AM »
Is your PC's language set to one that ordinarily would use a comma rather than a period as a decimal seperator, by any chance?

I guess that must be it.

Loap 0.0.11.0 will have a fix that, if my guess (re: language settings) is correct, should fix this issue for both of you.

This version works! Keep up the great work. :thumbsup:
My NeoLemmix packs: All You Need Is Lemmings - Long Live Lemmings! - Yippee! More Lemmings
SuperLemmix: Tomb Rodents featuring Lemmina Croft