-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash from subterrane.get_cavern_value() returning nil in df_caverns/level3.lua #39
Comments
Commenting out the comparison got me out of the constant crashes, allowing me to continue playing:
|
Odd. That should be impossible, get_cavern_value only returns nil when it's being called for a pos that's outside of the elevation range that the cavern is defined for and the initial pos.y check at the beginning of register_biome_check should be guarding against this. It shouldn't have anything to do with other biomes, dfcaverns isn't actually using the built-in biome system. The commenting-out that you did will cause nethercap and bloodthorn caverns to no longer spawn. A better approach would be to turn the line
into
That'll make the comparison safe against nil returns. I'll tinker around a bit on the weekend to see if I can figure out why this "impossible" result happened. Have you changed the boundary elevations of the various cavern layers to something other than the defaults, perhaps? |
…y between level 2 and level 3. Also add API to puzzle chests This fixes issue #39
I figured it out. The ambient sound mod was checking for the biome that the player's current position was in, and it was sending raw un-rounded position vectors into the method - something that never happened before the ambient sound mod was added recently. So if the player happened to be in the one-node-wide boundary between layers 2 and 3 in a bloodthorn/nethercap biome this crash could occur. I've added two fixes, one of them a nil check in the layer 3 biome function and the other a vector.round operation to "sanitize" the position being checked. I'll make a release later today. I'm going to take this opportunity to add some documentation to the next release, if you want the fix now you can grab it from the repository. |
I know this is closed, and will update to the patched version here in a moment, but just verifying this report, as I've been seeing it too.
|
dfcaverns release = 13917 (latest from contentdb)
minetest 5.6.1-_1
I'm deep underground and the game is constantly crashing.
Maybe caused by invalid biomes as I uninstalled a biome related mod today?
The text was updated successfully, but these errors were encountered: