In order to reproduce, on Space Exploration place an avatar in a ship and anchor the ship to an orbit/planet or launch the ship, whatever makes it switch surfaces.
After switching surface, control the previously placed avatar, when trying to disconnect from it this error will happen:
The mod Avatars (0.5.24) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Avatars::avatars_disconnect (ID 183)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function '__index'
__Avatars__/scripts/avatar_control.lua:62: in function 'bodySwap'
__Avatars__/scripts/avatar_control.lua:189: in function 'loseAvatarControl'
__Avatars__/control.lua:309: in function <__Avatars__/control.lua:306>
For some reason it was possible to save the game afer the crash but the saved game became unusable, every time it was restarted on multiplayer or single player it would crash with this message:
The mod Avatars (0.5.24) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Avatars::on_pre_player_left_game (ID 109)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function '__index'
__Avatars__/scripts/avatar_control.lua:62: in function 'bodySwap'
__Avatars__/scripts/avatar_control.lua:189: in function 'loseAvatarControl'
__Avatars__/control.lua:29: in function <__Avatars__/control.lua:27>