OpenTTD

Tasklist

FS#5796 - Crash in station_cmd.cpp

Attached to Project: OpenTTD
Opened by Ingo von Borstel (planetmaker) - Saturday, 02 November 2013, 00:54 GMT
Last edited by fonsinchen (fonsinchen) - Thursday, 07 November 2013, 20:50 GMT
Type Bug
Category Vehicles → Cargodist
Status Closed
Assigned To fonsinchen (fonsinchen)
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

via e-mail:

I played the newest nightly version r25935 but the same crash occured also with r25929. The error message in the game says: Assertion failed at line 3420 of ..\src\station_cmd.cpp: to->goods[c].node == it->first. After clicking OK, "Fatal Application Failure" window appears with this report:
This task depends upon

Closed by  fonsinchen (fonsinchen)
Thursday, 07 November 2013, 20:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r25948
Comment by fonsinchen (fonsinchen) - Tuesday, 05 November 2013, 21:32 GMT
For some reason the mapping between nodes and stations is broken there. I'll have a look at the dump when I find the time.
Comment by fonsinchen (fonsinchen) - Wednesday, 06 November 2013, 20:47 GMT
The problem is that the new LinkRefresher (called in station_cmd.cpp:3450) can merge the link graph we're just checking for stale links and invalidate it. That leads to invalid pointers all over the place and triggers the assert. Nasty. I'll find a solution.
Comment by fonsinchen (fonsinchen) - Wednesday, 06 November 2013, 21:09 GMT
This should do. As we're not interested in creating additional links there we may as well forbid the refresher to merge link graphs in that case. I'll think about it for another day and commit it tomorrow if there are no problems with it.

Loading...