minetest-mods / nether

Nether mod for Minetest
https://forum.minetest.net/viewtopic.php?f=11&t=5790
19 stars 25 forks source link

mapgen crash #43

Closed pheaver closed 3 years ago

pheaver commented 3 years ago

When exploring the nether, occasionally the server will crash with the following error:

2021-02-28 18:48:28: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'nether' in callback environment_OnGenerated(): ...minetest/minetest/bin/../mods/nether/mapgen_dungeons.lua:176: attempt to index field 'nether_caverns' (a nil value)
2021-02-28 18:48:28: ERROR[Main]: stack traceback:
2021-02-28 18:48:28: ERROR[Main]:       ...minetest/minetest/bin/../mods/nether/mapgen_dungeons.lua:176: in function 'excavate_dungeons'
2021-02-28 18:48:28: ERROR[Main]:       ...projects/minetest/minetest/bin/../mods/nether/mapgen.lua:462: in function <...projects/minetest/minetest/bin/../mods/nether/mapgen.lua:328>
2021-02-28 18:48:28: ERROR[Main]:       ...jects/minetest/minetest/bin/../builtin/game/register.lua:422: in function <...jects/minetest/minetest/bin/../builtin/game/register.lua:406>

I believe it occurs only on master (bafa4e8e) and not v3 (1fbab745).

I have only been able to reproduce it on my survival world with a lot of mods enabled (see attached file). I have not been able to reproduce on a brand new world.

example_world_mt.txt

Treer commented 3 years ago

Ethereal is clearing all the biomes to get rid of the default mapgen, but it also gets rid of the nether's biome: https://notabug.org/TenPlus1/ethereal/src/master/biomes.lua#L3

This kills the crab :)

Thanks for including that list of mods, I was initially scratching my head

I've set Ethereal as an optional dependency so that Nether is always loaded after Ethereal nukes everything.

The nether could detect Ethereal and revert to its legacy mapgen that doesn't use biomes, but I'd like to keep the legacy mapgen for legacy support only - it prevents a lot of the new features.