CubicMelon/terumet

Crashes on 0.4

Closed this issue · 2 comments

On my server Blocky Survival (using minetest 0.4) I got this error:

2019-03-24 15:56:38: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'terumet' in callback node_on_timer(): ...illys/.minetest/mods/terumet/machine/generic/machine.lua:241: attempt to index field 'nodedef' (a nil value) 2019-03-24 15:56:38: ERROR[Main]: stack traceback: 2019-03-24 15:56:38: ERROR[Main]: ...illys/.minetest/mods/terumet/machine/generic/machine.lua:241: in function 'read_state' 2019-03-24 15:56:38: ERROR[Main]: ...illys/.minetest/mods/terumet/machine/generic/machine.lua:152: in function 'find_adjacent_need_heat' 2019-03-24 15:56:38: ERROR[Main]: ...illys/.minetest/mods/terumet/machine/generic/machine.lua:195: in function 'push_heat_adjacent' 2019-03-24 15:56:38: ERROR[Main]: ...ys/.minetest/mods/terumet/machine/heater/furnace_htr.lua:121: in function <...ys/.minetest/mods/terumet/machine/heater/furnace_htr.lua:109>

I did a bit of investigation, and and at first glance it seems like terumet doesn't handle unknown nodes well; it assumes that minetest.registered_nodes[node_info.name] will return a nodedef.

Ahh, thanks for the error message and description of what you think the issue might be, that helps a ton.
I'll take a look at it when I get a chance soon.

I normally always make sure a nodedef isn't nil, but I might have missed it once or in an edge case.

Never mind, I looked at it now! Whoops. Looks like that was exactly it: I forgot to check for undefined nodes in a core function and it just never came up before. Thanks a bunch for your clear and concise error report!

If you download the current version off the repo here it should be fixed now.