Closed Fixer-007 closed 8 years ago
I don't see the fire
mod in this list. It is required and I think that this crash is because it is missing. Can you check if fire is enabled?
Default fire mod is enabled and included in minetest_game I guess, those mods I use are part of my modpack.
I wonder if weather_pack is attempting to strike() nodes that are not loaded. Does the crash happen if weather_pack is disabled?
Issue can be because rainy weather (including thunder) have ABM which removes fire nodes minetest.remove_node(pos)
lightning mod probably try perform action for node which no longer exist.
@Fixer-007, you can test if my guess is correct by disabling extinguish fire abm by setting config parameter weather_allow_abm=false
@sofar I would appreciate flag to allow disabling "fire creations by lightning" from lightning api.
I would appreciate flag to allow disabling "fire creations by lightning" from lightning api.
@xeranas @sofar disabling fire is bad workaround, instead you or sofar should make code handle such cases imo. But before rushing into this read text below.
Ok, so I wrote down weather_allow_abm = false
into minetest.conf. I did /set_weather thunder to see if lua stops. After very first lightning after few seconds I got error. After restart I've managed to hear more thunder, but after some time again catched error.
2016-06-25 17:58:05: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): D:\Newprog\minetest\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
2016-06-25 17:58:05: ERROR[Main]: stack traceback:
2016-06-25 17:58:05: ERROR[Main]: [C]: in function 'assert'
2016-06-25 17:58:05: ERROR[Main]: D:\Newprog\minetest\bin\..\builtin\game\misc.lua:41: in function 'after'
2016-06-25 17:58:05: ERROR[Main]: ...minetest\bin\..\mods\etherial_modpack\lightning\init.lua:203: in function <...minetest\bin\..\mods\etherial_modpack\lightning\init.lua:201>
2016-06-25 17:58:05: ERROR[Main]: [C]: in function 'set_node'
2016-06-25 17:58:05: ERROR[Main]: ...minetest\bin\..\mods\etherial_modpack\lightning\init.lua:153: in function 'strike'
2016-06-25 17:58:05: ERROR[Main]: ...inetest\bin\..\mods\etherial_modpack\thunder/thunder.lua:18: in function <...inetest\bin\..\mods\etherial_modpack\thunder/thunder.lua:10>
2016-06-25 17:58:05: ERROR[Main]: D:\Newprog\minetest\bin\..\builtin\game\register.lua:369: in function <D:\Newprog\minetest\bin\..\builtin\game\register.lua:349>
2016-06-25 17:58:05: ERROR[Main]: stack traceback:
2016-06-25 17:58:05: ERROR[Main]: [C]: in function 'set_node'
2016-06-25 17:58:05: ERROR[Main]: ...minetest\bin\..\mods\etherial_modpack\lightning\init.lua:153: in function 'strike'
2016-06-25 17:58:05: ERROR[Main]: ...inetest\bin\..\mods\etherial_modpack\thunder/thunder.lua:18: in function <...inetest\bin\..\mods\etherial_modpack\thunder/thunder.lua:10>
2016-06-25 17:58:05: ERROR[Main]: D:\Newprog\minetest\bin\..\builtin\game\register.lua:369: in function <D:\Newprog\minetest\bin\..\builtin\game\register.lua:349>
disabling fire is bad workaround, instead you or sofar should make code handle such cases imo
Configurable option is always good thing. Also not sure if Lua have try/catch things at all (if it easy to handle such case). However my guess seems was wrong and I'm out of ideas what can cause such issue.
I did /set_weather thunder to see if lua stops. After very first lightning after few seconds I got error.
I newer hit runtime error while testing weather_mod with lightning. For your environment it seems easily reproducible. It would be easier if I could to clone your mod pack and see locally what may cause issue.
@xeranas, uploaded, try it, use v7 mapgen and as newest mt as possible, be patient: etherial_modpack.zip
wheps, mistake on my part, deleted.
Fixed issue for me
Happened while I was in etherial biome and it was raining, lightning was present, shortly it stopped with lua error (weather_pack mod was installed).
List of used mods:
MT 0.4.14-dev