Loap crashes when trying to play a level

Started by fran5678can, January 26, 2022, 10:32:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fran5678can

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

namida

#1
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.
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)

fran5678can

Quote from: namida 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.
Crashes with any level. I downloaded using the download links from the topic.
call me lemmy

fran5678can

Updated to 0.0.9.0, still having the same issue.
call me lemmy

namida

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 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)

NieSch

I have a new PC and I have exactly the same problem. This is what happens:

Quote from: namida on January 27, 2022, 06:22:55 PM
(...) 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

namida

#6
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.
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)

NieSch

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

namida

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 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

#9
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".
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)

NieSch

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

namida

#11
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
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)

NieSch

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

namida

#13
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:

Quotev 0.000000 1.000000 0.250000
...
vt 0.000000 1.000000
...
vn 0.0000 0.0000 1.0000

into this value internally:

QuoteBlockModel >  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.
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)

NieSch

Quote from: namida 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?

I guess that must be it.

Quote from: namida on February 02, 2022, 01:02:00 AM
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