I was trying this mod out and when I controlled an avatar, went into the control center my character is sitting in, left and disconnected, the game crashed with this message:
The mod Avatars (0.5.17) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Avatars::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__Avatars/scripts/avatar_control.lua:50: in function 'bodySwap'
Avatars/scripts/avatar_control.lua:175: in function 'loseAvatarControl'
Avatars/control.lua:111: in function <Avatars/control.lua:59>
If I just connect to the avatar and leave, it's fine. Its the act of entering and leaving the control center with the avatar that breaks the game, when disconnecting. I am not sure if this also happens with an empty control center.