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

"homedecor:glowlight_quarter_14" screwdriver rotate mesecons crash #514

Closed
BuckarooBanzay opened this issue May 23, 2020 · 3 comments
Closed

Comments

@BuckarooBanzay
Copy link
Contributor

2020-05-23 12:08:12: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'afkkick' in callback environment_Step(): /data/world//worldmods/mesecons/mesecons/presets.lua:67: attempt to index local 'dir' (a nil value)
2020-05-23 12:08:12: ERROR[Main]: stack traceback:
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons/mesecons/presets.lua:67: in function 'get_any_inputrules'
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons/mesecons/internal.lua:95: in function 'get_any_rules'
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons/mesecons_wires/init.lua:81: in function </data/world//worldmods/mesecons/mesecons_wires/init.lua:67>
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute'
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons_debug/overrides.lua:7: in function 'f'
2020-05-23 12:08:12: ERROR[Main]: 	.../worldmods/monitoring/monitoring/metrictypes/counter.lua:46: in function 'execute'
2020-05-23 12:08:12: ERROR[Main]: 	/data/world//worldmods/mesecons/mesecons/actionqueue.lua:111: in function </data/world//worldmods/mesecons/mesecons/actionqueue.lua:73>
2020-05-23 12:08:12: ERROR[Main]: 	/usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
2020-05-23 12:08:12: ERROR[Main]: stack traceback:
@BobFred7
Copy link

https://github.com/S-S-X/mesecons/blob/6dc431f294f1844a7637ff2d4dc6f5ea73d8dc7e/mesecons/presets.lua#L67
rules_from_dir() was called with nil passed as dir
It says this comes from a call to get_any_inputrules(), and I see that in get_any_rules definition in internal.lua (https://github.com/S-S-X/mesecons/blob/6dc431f294f1844a7637ff2d4dc6f5ea73d8dc7e/mesecons/internal.lua#L95) but I see no call to rules_from_dir() in get_any_inputrules()

@TurkeyMcMac
Copy link

This should work as a quick fix to Mesecons:

diff --git a/mesecons/presets.lua b/mesecons/presets.lua
index e10dd36..64f2bff 100644
--- a/mesecons/presets.lua
+++ b/mesecons/presets.lua
@@ -74,6 +74,7 @@ end
 
 mesecon.rules.wallmounted_get = function(node)
 	local dir = minetest.wallmounted_to_dir(node.param2)
+	if not dir then return {} end
 	return rules_from_dir(rules_wallmounted, dir)
 end

@OgelGames
Copy link
Contributor

Fixed in minetest-mods/mesecons#623

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

No branches or pull requests

4 participants