ac-minetest / basic_machines

Simple automation mod for minetest
17 stars 22 forks source link

ServerError ...Invalid float vector dimension range 'x'...while using Areas Mod #15

Closed kakalak-lumberJack closed 6 years ago

kakalak-lumberJack commented 7 years ago

Greetings, I am getting occasional server crashes using Basic Machines. This appears to be some bug or incompatibility with Shadow NInja's Areas mod.

2017-10-28 22:06:19: ERROR[Main]: ServerError: AsyncErr: environment_Step: Invalid float vector dimension range 'x' (expected -2.14748e+06 < x < 2.14748e+06 got -nan). 2017-10-28 22:06:19: ERROR[Main]: stack traceback: 2017-10-28 22:06:19: ERROR[Main]: [C]: in function 'get_areas_for_pos' 2017-10-28 22:06:19: ERROR[Main]: /home/minetest/.minetest/mods/areas/api.lua:22: in function 'getAreasAtPos' 2017-10-28 22:06:19: ERROR[Main]: /home/minetest/.minetest/mods/areas/api.lua:76: in function 'canInteract' 2017-10-28 22:06:19: ERROR[Main]: /home/minetest/.minetest/mods/areas/interact.lua:4: in function 'old_is_protected' 2017-10-28 22:06:19: ERROR[Main]: ...e/minetest/.minetest/mods/basic_machines/protect.lua:12: in function 'is_protected' 2017-10-28 22:06:19: ERROR[Main]: ...ome/minetest/.minetest/mods/basic_machines/mover.lua:313: in function 'action_on' 2017-10-28 22:06:19: ERROR[Main]: ...ome/minetest/.minetest/mods/basic_machines/mover.lua:927: in function 'use_keypad' 2017-10-28 22:06:19: ERROR[Main]: ...ome/minetest/.minetest/mods/basic_machines/mover.lua:795: in function 'func' 2017-10-28 22:06:19: ERROR[Main]: ...me/minetest/minetest/bin/../builtin/common/after.lua:18: in function '?' 2017-10-28 22:06:19: ERROR[Main]: ...e/minetest/minetest/bin/../builtin/game/register.lua:412: in function <...e/minetest/minetest/bin/../builtin/game/register.lua:392> -Server runs on 0.4.16 stable -Mods are both up to date from Github versions -The crashes are reported by players to happen after activating the mover with the keypad in protected areas, though I have not been able to replicate this using a test player. Crashes always include the first line Error[Main]: ServerError notice, but do always provide the full stack traceback.

Let me know if I can provide any more information to help resolve this problem. Thanks

ac-minetest commented 6 years ago

Its one of those 'hard to detect' bugs. Was caused when setting up mover with punches - if you did 'unfortunate' combination of positions then calculated dimensions of area were 0: (x1-x0 + 1 = 0). This would then create further mess with stuff like position = 0/0 = NaN ( not defined number ):

Invalid float vector dimension range 'x' (expected -2.14748e+06 < x < 2.14748e+06 got -nan). < Fixed now.

ChaosWormz commented 6 years ago

I got the exact error so i guess this will also solve the issue. is this also an issue with the areas mod too?