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
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
|
Detailsvia 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
Thursday, 07 November 2013, 20:50 GMT
Reason for closing: Fixed
Additional comments about closing: in r25948

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.

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.

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.