minetest-mods / drawers

[MTG/MCL2] A Minetest Mod adding storage drawers in different sizes and wood types.
Other
19 stars 26 forks source link

pipeworks related crash #47

Closed BuckarooBanzay closed 4 years ago

BuckarooBanzay commented 4 years ago

Another crash (follow up to #46) Happened on 62b5fa51ae0bbb8a2375a8bc920b4fec2b9907c2

2020-06-10 12:24:14: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'pipeworks' in callback environment_Step(): Invalid position (expected table got nil).
2020-06-10 12:24:14: ERROR[Main]: stack traceback:
2020-06-10 12:24:14: ERROR[Main]:   [C]: in function 'get_meta'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/drawers/lua/api.lua:272: in function 'drawer_get_content'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/drawers/lua/controller.lua:240: in function 'controller_get_drawer_index'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/drawers/lua/controller.lua:256: in function 'insert_object'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/pipeworks/item_transport.lua:325: in function 'on_step'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/pipeworks/luaentity.lua:364: in function 'move_entities_globalstep_part2'
2020-06-10 12:24:14: ERROR[Main]:   /data/world//worldmods/pipeworks/luaentity.lua:377: in function 'func'
2020-06-10 12:24:14: ERROR[Main]:   ...ocal/share/minetest/builtin/profiler/instrumentation.lua:106: in function 'f'
2020-06-10 12:24:14: ERROR[Main]:   .../worldmods/monitoring/monitoring/metrictypes/counter.lua:46: in function 'wrappedFn'
2020-06-10 12:24:14: ERROR[Main]:   ...orldmods/monitoring/monitoring_pipeworks/globalsteps.lua:43: in function 'globalstep'
2020-06-10 12:24:14: ERROR[Main]:   ...//worldmods/monitoring/monitoring/builtin/globalstep.lua:29: in function <...//worldmods/monitoring/monitoring/builtin/globalstep.lua:20>
2020-06-10 12:24:14: ERROR[Main]:   /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
lnjX commented 4 years ago

The drawer index of the controller seems to be corrupted, in the last error the "visualid" was empty and this time the "drawer_pos" is missing. Rebuilding the drawer controller or inserting a new item should fix this (this will trigger the drawer to reindex the connected drawers).

I couldn't reproduce the problem, but anyways I tried to provide a fix for this in https://github.com/minetest-mods/drawers/commit/b97e905bc2c936ab9007c97a4e950e8a3809abd2. Ideally this should already fix your problem with the drawer controller.

(And btw, thanks for reporting)

BuckarooBanzay commented 4 years ago

I couldn't reproduce the problem, but anyways I tried to provide a fix for this in b97e905. Ideally this should already fix your problem with the drawer controller.

thanks a lot :+1: will try this tomorrow when the next updates are scheduled

(And btw, thanks for reporting)

Thank you for this awesome mod :tada:

BuckarooBanzay commented 4 years ago

hasn't happened again, closing :+1: