FS#129 - Crash when giving a lost train a Go To order

Attached to Project: OpenTTD
Opened by Anonymous Submitter - Wednesday, 19 April 2006, 13:38 GMT
Last edited by Celestar (Celestar) - Wednesday, 19 April 2006, 16:54 GMT
Type Bug
Category Core
Status Closed
Assigned To Celestar (Celestar)
Operating System All
Severity Critical
Priority High
Reported Version 0.4.7
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When I give a train that is lost (red dot in the train overview, and it has no arrow pointing to an entry in the Orders list) the game will crash.
This task depends upon

Closed by  Celestar (Celestar)
Friday, 21 April 2006, 17:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  Will not fix already-broken old savegames :(
Comment by ArmEagle (ArmEagle) - Wednesday, 19 April 2006, 13:51 GMT
Ok, that was mine. Decided to make an accoutn after all.

Savegame added. Trains 6 and 8 are lost.
Comment by ArmEagle (ArmEagle) - Wednesday, 19 April 2006, 14:43 GMT
Savegame where train 6 and 7 don't lose a target Order after finishing the last.
Stations are still the same, though i have been moving them around a lot.
Comment by Celestar (Celestar) - Wednesday, 19 April 2006, 16:51 GMT
num_orders of train 6 is 3, while there are only 2 orders in the list (order number 3 is NULL)

it seems that the next_shared/prev_shared link got wrong:

(gdb) p v->prev_shared->next_shared
$5 = (Vehicle *) 0x0

This should never happen.