When using mods such as factory search or in cases when one needs to see a remote place before switching avatars, it is quite easy to trigger this error when trying to control an avatar in uplink mode:
The mod Avatars (0.5.21) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Avatars::on_gui_click (ID 1)
__Avatars__/scripts/avatar_control.lua:26: attempt to index field 'character' (a nil value)
stack traceback:
__Avatars__/scripts/avatar_control.lua:26: in function 'canGainControl'
__Avatars__/scripts/avatar_control.lua:98: in function 'gainAvatarControl'
__Avatars__/control.lua:91: in function <__Avatars__/control.lua:65>