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

radiation damage crash(?) #354

Open
Kimapr opened this issue Mar 20, 2024 · 4 comments
Open

radiation damage crash(?) #354

Kimapr opened this issue Mar 20, 2024 · 4 comments
Labels
Bug Something isn't working

Comments

@Kimapr
Copy link

Kimapr commented Mar 20, 2024

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: ea14f60

@Niklp09 Niklp09 added the Bug Something isn't working label Mar 20, 2024
@BuckarooBanzay
Copy link
Member

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

local obj_pos = vector.add(object:get_pos(), calculate_object_center(object))

Do you know what objects might be around there?

@Athozus
Copy link
Member

Athozus commented Apr 1, 2024

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

local obj_pos = vector.add(object:get_pos(), calculate_object_center(object))

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
Copy link
Member

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
Copy link
Member

S-S-X commented Apr 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants