tigris-mt / elevator

An entity-based elevator allowing fast realtime travel in Minetest.
https://forum.minetest.net/viewtopic.php?f=9&t=17079
Other
4 stars 14 forks source link

Crash when entering elevator just after digging shaft #8

Closed luk3yx closed 4 years ago

luk3yx commented 5 years ago

The title should give enough information to fix this.

ghost commented 4 years ago

Is this still happening?

luk3yx commented 4 years ago

There have been no code changes since I reported the issue, so I assume it would still happen.

ghost commented 4 years ago

I can't reproduce it however. Probably need more details

luk3yx commented 4 years ago

It requires lag (or a bad connection), otherwise the elevator changes to an inactive elevator before anyone can enter it.

shacknetisp commented 4 years ago

Please include the crash report (backtrace) that Minetest prints to the console when this occurs.

luk3yx commented 4 years ago

Please include the crash report (backtrace) that Minetest prints to the console when this occurs.

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback item_OnPlace(): .../mods/elevator/components.lua:268: attempt to index local 'motor' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]:    .../mods/elevator/components.lua:268: in function 'on_rightclick'
ERROR[Main]:    .../builtin/game/item.lua:417: in function <.../builtin/game/item.lua:410>

I will create a PR to fix this issue shortly.