Same error. Occurred to me when my character was on a space platform and I was in editor mode. Typed /editor to turn off editor mode and it crashed with this error code. No idea if it's the same cause as the others on this thread, but I wanted to give context to my crash report.
Thanks!
Error while running event planet-portal::on_tick (ID 0)
planet-portal/control.lua:388: attempt to index global 'global' (a nil value)
stack traceback:
planet-portal/control.lua:388: in function <planet-portal/control.lua:383>