minetest-spawnit/manage_ao_blocks.lua:140: attempt to index a nil value #5862

Closed
opened 2023-12-29 11:49:26 +00:00 by AliasAlreadyTaken · 6 comments
2023-12-29 07:37:23: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'spawnit' in callback environment_Step(): ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:140: attempt to index a nil value
2023-12-29 07:37:23: ERROR[Main]: stack traceback:
2023-12-29 07:37:23: ERROR[Main]: 	...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:140: in function 'is_moving_too_fast'
2023-12-29 07:37:23: ERROR[Main]: 	...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:163: in function 'get_ao_block_hpos_set'
2023-12-29 07:37:23: ERROR[Main]: 	...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:250: in function 'update_visibility'
2023-12-29 07:37:23: ERROR[Main]: 	...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:344: in function 'func'
2023-12-29 07:37:23: ERROR[Main]: 	..._live/bin/../mods/minetest-futil/minetest/globalstep.lua:78: in function 'func'
2023-12-29 07:37:23: ERROR[Main]: 	...inetest_live/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_live/bin/../builtin/profiler/instrumentation.lua:101>
2023-12-29 07:37:23: ERROR[Main]: 	.../mt/5.7.0/Minetest_live/bin/../builtin/game/register.lua:446: in function <.../mt/5.7.0/Minetest_live/bin/../builtin/game/register.lua:432>

``` 2023-12-29 07:37:23: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'spawnit' in callback environment_Step(): ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:140: attempt to index a nil value 2023-12-29 07:37:23: ERROR[Main]: stack traceback: 2023-12-29 07:37:23: ERROR[Main]: ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:140: in function 'is_moving_too_fast' 2023-12-29 07:37:23: ERROR[Main]: ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:163: in function 'get_ao_block_hpos_set' 2023-12-29 07:37:23: ERROR[Main]: ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:250: in function 'update_visibility' 2023-12-29 07:37:23: ERROR[Main]: ...t_live/bin/../mods/minetest-spawnit/manage_ao_blocks.lua:344: in function 'func' 2023-12-29 07:37:23: ERROR[Main]: ..._live/bin/../mods/minetest-futil/minetest/globalstep.lua:78: in function 'func' 2023-12-29 07:37:23: ERROR[Main]: ...inetest_live/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_live/bin/../builtin/profiler/instrumentation.lua:101> 2023-12-29 07:37:23: ERROR[Main]: .../mt/5.7.0/Minetest_live/bin/../builtin/game/register.lua:446: in function <.../mt/5.7.0/Minetest_live/bin/../builtin/game/register.lua:432> ```
AliasAlreadyTaken added the
1. kind/bug
2. prio/critical
labels 2023-12-29 11:49:35 +00:00

I assume this was what crashed the server previously?

I assume this was what crashed the server previously?
flux added this to the flux's TODO list project 2023-12-29 18:24:15 +00:00
flux self-assigned this 2023-12-29 18:24:20 +00:00
flux added the
4. step/at work
label 2023-12-29 18:24:27 +00:00
Member

apparently minetest.get_connected_players() can return disconnected players? or at least players without velocity? anyway, added some checks to make sure nothing crashes:

b4a3f9caef

apparently `minetest.get_connected_players()` can return disconnected players? or at least players without velocity? anyway, added some checks to make sure nothing crashes: https://github.com/fluxionary/minetest-spawnit/commit/b4a3f9caef1ad241c746e689cc8b13f3f53d0c47
flux added
4. step/ready to QA test
and removed
4. step/at work
labels 2023-12-29 18:34:21 +00:00
Author
Owner

apparently minetest.get_connected_players() can return disconnected players?

If that's the case, then minetest.get_connected_players() will crash in many many other occasions as well, because hardly anyone checks for existence when one gets a list of player objects this way

> apparently `minetest.get_connected_players()` can return disconnected players? If that's the case, then `minetest.get_connected_players()` will crash in many many other occasions as well, because hardly anyone checks for existence when one gets a list of player objects this way
AliasAlreadyTaken added this to the 1.1.123 milestone 2023-12-29 21:11:03 +00:00
Author
Owner

QA

Could that have been a pipeworks fake player again?

I can't reproduce the issue, we'll have to wait for it to happen again.

QA Could that have been a pipeworks fake player again? I can't reproduce the issue, we'll have to wait for it to happen again.
AliasAlreadyTaken added the
ugh/QA main
label 2024-01-28 13:14:32 +00:00
Member

Could that have been a pipeworks fake player again?

minetest.get_connected_players() won't ever return pipeworks fake players, this had to have been a once-connected player that somehow hadn't been properly been removed from the list.

> Could that have been a pipeworks fake player again? `minetest.get_connected_players()` won't ever return pipeworks fake players, this had to have been a once-connected player that somehow hadn't been properly been removed from the list.
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2024-03-29 21:35:50 +00:00
flux removed this from the flux's TODO list project 2024-03-29 21:35:53 +00:00
flux removed their assignment 2024-03-29 21:35:55 +00:00
Member

presuming this is fixed

presuming this is fixed
flux closed this issue 2024-03-29 21:36:47 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#5862
No description provided.