Placing direction sign against specific nodes crashes server
FeXoR-o-Illuria opened this issue · comments
Placing e.g.
White direction sign (signs_road:white_right_sign)
against e.g. the top part of
White Truss Superstructure Simple Left End (bridger:truss_superstructure_simple_end_left_white)
causes the server to crash.
Error Message:
ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'signs_road' in callback item_OnPlace(): /data/world//worldmods/display_modpack/signs_api/init.lua:131: attempt to compare number with nil
stack traceback: /data/world//worldmods/display_modpack/signs_api/init.lua:131: in function </data/world//worldmods/display_modpack/signs_api/init.lua:91>
Another problematic nodes to place direction signs against:
Spiral Staircase (homedecor:spiral_staircase) - Some of the very upper parts, probably direction dependent
as well as several other rotated large superstructure nodes.
I tested and found that for that server:
display_api.is_rotation_restricted() => false
minetest.registered_nodes[signs_road:white_right_sign].paramtype2 == "facedir" => true
So the only 2 lines that may cause:
test[ndir] = nil (in line 131)
are lines 112 and 115
In line 115 the table has numerical keys 0, 1, 2, 3, 4, 8 <- That "[8]=" looks suspicious to me and causes a holey array ;)