CasimirKaPazi / Voxelgarden

Subgame for Minetest
https://forum.minetest.net/viewtopic.php?f=15&t=6346
47 stars 13 forks source link

AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_flat' in callback luaentity_Step() #62

Closed ghost closed 4 years ago

ghost commented 4 years ago

Game crashes with 'an error occurred' screen after about 30 seconds. it doesn't seem to matter what I'm doing; really just jumping and walking around. The error is

AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_flat' in callback luaentity_Step(): /home/user/.minetest/games/voxelgarden/mods/mobs/api.lua:136: attempt to index a nil value
stack traceback:
    /home/user/.minetest/games/voxelgarden/mods/mobs/api.lua:136: in function 'set_velocity'
    /home/user/.minetest/games/voxelgarden/mods/mobs/api.lua:1744: in function 'do_states'
    /home/user/.minetest/games/voxelgarden/mods/mobs/api.lua:2981: in function </home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:2815>

Sometimes it crashes with this different, but similiar error:

AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_flat' in callback luaentity_Step(): /home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:147: attempt to index local 'v' (a nil value)
stack traceback:
    /home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:147: in function 'get_velocity'
    /home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:728: in function 'do_jump'
    /home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:1816: in function 'do_states'
    /home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:2981: in function </home/lane/.minetest/games/voxelgarden/mods/mobs/api.lua:2815>

World uses v6 generator with no mods running. Running Manjaro 5.4.34-1

Thank you for your time :)

bgenc commented 4 years ago

Same error (2nd one) here. Running v7, minetest 5.2, ArcoLinuxB 5.6.2-arch1-2. Happens a few seconds after start, even when I don't touch anything at all.

mvpcortes commented 4 years ago

Same error v7, minetest 5.2.0, ubuntu 18.04

eliam commented 4 years ago

Logged in to raise the same.

Voxelgarden 5.0 (stable release) Minetest 5.3.0-dev (Linux)

2020-05-20 06:34:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_flat' in callback luaentity_Step(): /minetest/bin/../games/voxelgarden/mods/mobs/api.lua:542: attempt to index local 'pos' (a nil value) 2020-05-20 06:34:10: ERROR[Main]: stack traceback: 2020-05-20 06:34:10: ERROR[Main]: /minetest/bin/../games/voxelgarden/mods/mobs/api.lua:542: in function 'within_limits' 2020-05-20 06:34:10: ERROR[Main]: /minetest/bin/../games/voxelgarden/mods/mobs/api.lua:617: in function 'do_env_damage' 2020-05-20 06:34:10: ERROR[Main]: /minetest/bin/../games/voxelgarden/mods/mobs/api.lua:2969: in function </minetest/bin/../games/voxelgarden/mods/mobs/api.lua:2815>

CasimirKaPazi commented 4 years ago

This was fixed in the original mobs redo mod. Since "mobs" in VG is just a trimmed down version of it I copied the latest code. For me it works now. Would be good to hear some others confirming it.

ghost commented 4 years ago

I just copied api.lua, api.txt from https://notabug.org/TenPlus1/mobs_redo/ and error is gone.

This was fixed in the original mobs redo mod. Since "mobs" in VG is just a trimmed down version of it I copied the latest code. For me it works now. Would be good to hear some others confirming it.