Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing direction sign against specific nodes crashes server #48

Open
FeXoR-o-Illuria opened this issue Jan 9, 2022 · 2 comments · Fixed by mt-mods/display_modpack#1

Comments

@FeXoR-o-Illuria
Copy link

FeXoR-o-Illuria commented Jan 9, 2022

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.

@FeXoR-o-Illuria
Copy link
Author

FeXoR-o-Illuria commented Jan 9, 2022

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 ;)

@FeXoR-o-Illuria FeXoR-o-Illuria changed the title Placing a direction sign against specific nodes can cause server crash Placing a direction sign against specific nodes crashes server Jan 9, 2022
@FeXoR-o-Illuria FeXoR-o-Illuria changed the title Placing a direction sign against specific nodes crashes server Placing direction sign against specific nodes crashes server Jan 9, 2022
@Niklp09
Copy link

Niklp09 commented Jun 11, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants