mt-mods / technic

Technic mod for Minetest
18 stars 25 forks source link

std:: errors when running the technic plus network #350

Open KaylebJay opened 8 months ago

KaylebJay commented 8 months ago

After a short while, the server encounters this crash when running network code, and falls. The crashes seem to vary... Our minetest version: https://gitlab.com/tunnelers-abyss/minetest/-/tree/tunnelers-5.8?ref_type=heads Our version of technic plus: https://gitlab.com/tunnelers-abyss/technic/-/commits/techplus/?ref_type=heads

As far as I know, nothing was changed in the network code.

The errors:

2024-02-21 17:43:41: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'technic' in callback environment_Step(): std::bad_array_new_length
2024-02-21 17:43:41: ERROR[Main]: stack traceback:
2024-02-21 17:43:41: ERROR[Main]:     [C]: in function 'read_from_map'
2024-02-21 17:43:41: ERROR[Main]:     ...inetest/bin/../mods/technic/technic/machines/network.lua:596: in function 'run_nodes'
2024-02-21 17:43:41: ERROR[Main]:     ...inetest/bin/../mods/technic/technic/machines/network.lua:639: in function 'network_run'
2024-02-21 17:43:41: ERROR[Main]:     ...echnic/technic/machines/switching_station_globalstep.lua:41: in function 'func'
2024-02-21 17:43:41: ERROR[Main]:     ...ome/minetest/bin/../builtin/profiler/instrumentation.lua:107: in function <...ome/minetest/bin/../builtin/profiler/instrumentation.lua:100>
2024-02-21 17:43:41: ERROR[Main]:     /home/minetest/bin/../builtin/game/register.lua:429: in function </home/minetest/bin/../builtin/game/register.lua:415>
2024-02-21 17:23:35: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'technic' in callback environment_Step(): std::bad_alloc
2024-02-21 17:23:35: ERROR[Main]: stack traceback:
2024-02-21 17:23:35: ERROR[Main]:     [C]: in function 'read_from_map'
2024-02-21 17:23:35: ERROR[Main]:     ...inetest/bin/../mods/technic/technic/machines/network.lua:596: in function 'run_nodes'
2024-02-21 17:23:35: ERROR[Main]:     ...inetest/bin/../mods/technic/technic/machines/network.lua:639: in function 'network_run'
2024-02-21 17:23:35: ERROR[Main]:     ...echnic/technic/machines/switching_station_globalstep.lua:41: in function 'func'
2024-02-21 17:23:35: ERROR[Main]:     ...ser/minetest/bin/../builtin/profiler/instrumentation.lua:107: in function <...ser/minetest/bin/../builtin/profiler/instrumentation.lua:100>
2024-02-21 17:23:35: ERROR[Main]:     /home/vpsuser/minetest/bin/../builtin/game/register.lua:429: in function </home/vpsuser/minetest/bin/../builtin/game/register.lua:415>
BuckarooBanzay commented 8 months ago

would it be possible to add some logging before this statement: https://gitlab.com/tunnelers-abyss/technic/-/blob/techplus/technic/machines/network.lua?ref_type=heads#L596

I'm interested in the node-position and what there might be :thinking:

KaylebJay commented 8 months ago

We already tried that (https://gitlab.com/tunnelers-abyss/technic/-/commit/063d3a7a974d0ecaffba983f3da1061b76dcd12c) but then the server always silently fell (very likely a segfault). gdb doesn't run cleanly in our env, so we can't extract that segfault for now.

BuckarooBanzay commented 1 month ago

any progress on this, another clue perhaps?

this smells a lot like an engine bug, maybe try it again with the latest engine and let us know if something changed.