pioneerspacesim/pioneer — Issue #999: Hyperspace while docked causes segfault
Author: Brianetta
Created: 2012-02-21 22:47:52+00:00
State: open
Labels: Crash or hang

There are two ways to replicate this.

- Lua
1. Start new game in Sol.
2. In Lua console, execute ```Game.player:HyperspaceTo(SystemPath.New(-1,-1,0,0))``` (Barnard's Star)
2. Observe crash.
- In gameplay
1. Select hyperspace target within range of current ship. Preferably, use a ship with a high hyperspace class, because a longer countdown makes this easier.
2. Select a space station and get clearance to dock. A surface pad station is best.
2. Get on a docking approach. Autopilot is useful, but not essential.
2. A moment before touchdown, initiate hyperspace.
2. You will see the station screen load, if the docking sequence is quick enough.
2. Observe crash.

Solutions:

- Prohibit HyperspaceTo() method on docked ships.
- Cancel running hyperspace countdowns before entering "Docked" state.