mt-mods / technic

Technic mod for Minetest
18 stars 25 forks source link

radiation damage crash(?) #354

Closed Kimapr closed 1 month ago

Kimapr commented 8 months ago
2024-03-20 17:35:15: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'beds' in callback LuaABM::trigger(): /usr/share/minetest/builtin/common/vector.lua:162: attempt to index local 'a' (a nil value)
2024-03-20 17:35:15: ERROR[Main]: stack traceback:
2024-03-20 17:35:15: ERROR[Main]:   /usr/share/minetest/builtin/common/vector.lua:162: in function 'add'
2024-03-20 17:35:15: ERROR[Main]:   .../nonsensical_skyblock/mods/technic/technic/radiation.lua:323: in function 'dmg_object'
2024-03-20 17:35:15: ERROR[Main]:   .../nonsensical_skyblock/mods/technic/technic/radiation.lua:377: in function <.../nonsensical_skyblock/mods/technic/technic/radiation.lua:366>

version: ea14f604c9acc736f9eb1a92ab5689b598d81905

BuckarooBanzay commented 8 months ago

looks like the position returned from the entity/object was nil: https://github.com/mt-mods/technic/blob/ea14f604c9acc736f9eb1a92ab5689b598d81905/technic/radiation.lua#L323

Do you know what objects might be around there?

Athozus commented 7 months ago

looks like the position returned from the entity/object was nil:

https://github.com/mt-mods/technic/blob/ea14f604c9acc736f9eb1a92ab5689b598d81905/technic/radiation.lua#L323

Do you know what objects might be around there?

Maybe it's because bed is a node that uses two blocks of space ? So that it detected a node on the bottom of the bed, but there was no node attached (but the head of the bed). So it caused the crash.

BuckarooBanzay commented 7 months ago

Maybe it's because bed is a node that uses two blocks of space ? So that it detected a node on the bottom of the bed, but there was no node attached (but the head of the bed). So it caused the crash.

This issue has to do with entities, not nodes

a possible "fix" would be to add a nil-check to the returned position of the entity but the root-cause is not really fixed (nil returned from get_pos())

S-S-X commented 7 months ago

I think it is possible that disconnected/partial players can still be included here. If that's the case then what happens is exactly what happens here: instance is there and valid but everything returns nil as there's no data anymore.

Not necessarily cause but is a thing with certain stuff and isn't exactly a bug.

BuckarooBanzay commented 1 month ago

no feedback here in a while and no bug-repro to work with, if the problem persists feel free to reopen the issue