pioneerspacesim/pioneer — Issue #721: Assertion failure in ShipAICmd.cpp:795 (AICmdFlyTo::CheckSuicide)
Author: johnbartholomew
Created: 2011-10-23 19:09:41+00:00
State: open

I used the autopilot to enter medium Earth orbit. Then left the ship orbiting (now in manual mode) at max. time acceleration. Presumably this was triggered from the autopilot of a trade-ship.

Stack trace:
```
...
#3 0x000000000050e62d in AICmdFlyTo::CheckSuicide (this=0x7fffe006d430) at ../../pioneer/src/ShipAICmd.cpp:795
#4 0x000000000050fb48 in AICmdFlyTo::TimeStepUpdate (this=0x7fffe006d430) at ../../pioneer/src/ShipAICmd.cpp:928
#5 0x00000000005019b9 in Ship::AITimeStep (this=0x68f8210, timeStep=) at ../../pioneer/src/Ship-AI.cpp:85
#6 0x000000000050754b in Ship::StaticUpdate (this=0x127d, timeStep=0) at ../../pioneer/src/Ship.cpp:785
#7 0x00000000005271b3 in Space::TimeStep (step=) at ../../pioneer/src/Space.cpp:566
#8 0x00000000004ccfac in Pi::MainLoop () at ../../pioneer/src/Pi.cpp:1324
#9 0x00000000004cea8a in Pi::Start () at ../../pioneer/src/Pi.cpp:1261
#10 0x00000000005656d5 in main (argc=) at ../../pioneer/src/main.cpp:18
```

Some possibly relevant variables dumped from gdb (there would be more locals but this was an optimised build so gdb couldn't extract them):
```
(gdb) print t
$1 = 0
(gdb) print m_state
$3 = 0
(gdb) print m_endvel
$6 = 0
(gdb) print sbody->name._M_dataplus._M_p
$12 = 0x14c5968 "Sol"
(gdb) print m_frame->m_label._M_dataplus._M_p
$15 = 0x334e2c8 "System"
(gdb) print m_targframe->m_label._M_dataplus._M_p
$18 = 0x334e2c8 "System"
(gdb) print m_origframe->m_label._M_dataplus._M_p
$20 = 0x7fffe0000258 "H\002"
(gdb) print m_child
$23 = (AICommand *) 0x0
(gdb) print m_endvel
$24 = 0
(gdb) print m_orbitrad
$25 = 0
(gdb) print m_targframeIndex
$26 = 0
(gdb) print m_coll
$27 = true
(gdb) print m_posoff
$28 = {x = 135686518213.19327, y = 4052083332.0064354, z = 159909728826.38135}
(gdb) print m_shipIndex
$30 = -535151920
(gdb) print m_ship->m_label._M_dataplus._M_p
$13 = 0x5c14c88 "GY-5352"
```