Splizard / minetest-mod-snow

Adds snow biomes to Minetest.
http://splizard.com/minetest/mods/snow-biomes/
Other
10 stars 9 forks source link

Crash Due to AsyncErr upon Startup #40

Closed WulftheNordicRanger closed 5 years ago

WulftheNordicRanger commented 5 years ago

A few seconds after starting a world with this mod enabled the world crashes with this error:

2018-11-21 23:50:36: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30000. 2018-11-21 23:50:39: ACTION[Server]: Moving FrostRanger to static spawnpoint at (0,3,0) 2018-11-21 23:50:39: ACTION[Server]: FrostRanger [127.0.0.1] joins game. 2018-11-21 23:50:39: ACTION[Server]: FrostRanger joins game. List of players: FrostRanger 2018-11-21 23:50:45: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'snow' in callback environment_OnGenerated(): ...cetheunknownranger/.minetest/mods/snow/src/mapgen_v6.lua:258: attempt to compare nil with number 2018-11-21 23:50:45: ERROR[Main]: stack traceback: 2018-11-21 23:50:45: ERROR[Main]: ...cetheunknownranger/.minetest/mods/snow/src/mapgen_v6.lua:258: in function <...cetheunknownranger/.minetest/mods/snow/src/mapgen_v6.lua:190> 2018-11-21 23:50:45: ERROR[Main]: /usr/share/minetest/builtin/game/register.lua:420: in function </usr/share/minetest/builtin/game/register.lua:400>

I am running 4.17.1 on linux mint 18.3

HybridDog commented 5 years ago

Thanks for reporting the crash. Which settings do you use?

I can reproduce a crash when disabling smooth biome transitions. I usually don't play without smooth biome transitions, so I didn't test the code enough, sorry. https://github.com/Splizard/minetest-mod-snow/blob/221c44003469cb9fac63c5ce81d100ba28ce3f39/src/mapgen_v6.lua#L258

WulftheNordicRanger commented 5 years ago

Do you mean for minetest or for the mod?

HybridDog commented 5 years ago

I mean settings for the snow mod.

WulftheNordicRanger commented 5 years ago

Here it is. I changed nothing from the defaults settingtypes.txt

HybridDog commented 5 years ago

This commit should fix the crash (it does so for me), please test. https://github.com/Splizard/minetest-mod-snow/commit/b4add0091c083bebc10fbe95bdac54fc0bac648f

HybridDog commented 5 years ago

I actually thought about your settings and not the default ones. Nonetheless, I now noticed that the description of the Smooth Transition setting is wrong. You may want to reconsider toggling it, it does not change debug output. https://github.com/Splizard/minetest-mod-snow/commit/6529ab93042e288c1e08130ab85399e450804511

WulftheNordicRanger commented 5 years ago

The patch works perfectly, Thanks! Excited to play around with this mod! :D