Page 1 of 1

Odd train, odd crash

Posted: 03 Sep 2005 01:35
by krtaylor
I was playing the Japanset test GRF, and everything was going along normally. Then I saw what appeared to be a lone engine, or unexpectedly short train, stopped in a station. It was kind of hidden behind trees, so I didn't get a very good look. I clicked on it to investigate, and the game crashed instantly. Here's the crashlog.

Posted: 03 Sep 2005 01:37
by Patchman
The crash log is rather useless at that point, as is the savegame.

The only useful thing would be savegame just before the train breaks up, I'm afraid.

Posted: 03 Sep 2005 01:40
by krtaylor
I restarted the game and looked again, and I think I figured out what happened. I'd just apgraded the PGS stations set to the new versions, and things are using different IDs. That section of the station had been PGS freight, and apparently one of the IDs it had been using, now is a buffer. In the middle of the platform, that is, with a train already IN the platform, it magically changed into a buffer when the new version loaded.

Right now, when there are any changes in station type (or missing GRFs), the game quite logically puts in the original TTD ones, on the reasonable grounds that they'll work anywhere. Maybe we need a similar cross-check for station segments that are not passable by trains.

Posted: 03 Sep 2005 01:44
by Patchman
krtaylor wrote:Maybe we need a similar cross-check for station segments that are not passable by trains.
Impossible, since that information is only stored in the grf, and when the grf is not available (or its ID changed, which amounts to the same thing), there is nothing but the TTD station behaviour to fall back to.

Posted: 03 Sep 2005 01:46
by krtaylor
My point exactly - fall back to the original TTD station if there's any confusion. Is there any way of knowing, when a game loads, whether a particular station segment was supposed to be passable or impassable, without necessarily having that exact GRF file? I mean, if previously it was passable, and now the GRF file says it should be impassable, replace it with the original TTD station so as not to cause problems like trapped trains (as happened to me.)

Posted: 03 Sep 2005 04:52
by Patchman
krtaylor wrote:My point exactly - fall back to the original TTD station if there's any confusion. Is there any way of knowing, when a game loads, whether a particular station segment was supposed to be passable or impassable, without necessarily having that exact GRF file?
No, which was my point.

Posted: 03 Sep 2005 10:37
by krtaylor
Yes, but it didn't fall back to the original TTD station when it was confused. If it had, there would have been no problem. Instead, it created a non-accessible station piece, on a square which not only had previously been accessible, but actually had a train in it at the time, thus breaking the train and causing a game crash when I clicked on it.

Posted: 03 Sep 2005 13:56
by Patchman
Oh. I think that might be due to the colliding GRFIDs. It's possible that, while the graphics weren't available, it was using the other grf's settings. Well, this is easy enough to fix: don't load station grfs that have the same GRFID...

Posted: 03 Sep 2005 22:24
by krtaylor
No, see, that was unavoidable in this case - I was upgrading version pre3 of the PGS set, to version pre4.

Posted: 04 Sep 2005 04:55
by Patchman
krtaylor wrote:No, see, that was unavoidable in this case - I was upgrading version pre3 of the PGS set, to version pre4.
Well sure, but don't complain if that breaks things...

Posted: 04 Sep 2005 05:45
by DaleStan
Or, more accurately, "don't complain to Patchman if that breaks things."

Posted: 04 Sep 2005 05:59
by Patchman
More precisely, the problem is a new grf file overriding old stations with the same GRFID with new data. If the GRFID in question is simply missing, it should all work fine. But there's no way to tell if the new data is simply an update to an existing file, or an entirely new, incompatible file that just happens to have the same ID.

This is impossible to fix except by using GRFIDs as they're meant to be used, i.e. having a unique one for every set, and changing it when the set is incompatible to earlier versions (such as dbset -> dbsetxl).

Posted: 04 Sep 2005 12:05
by krtaylor
So the way to fix it in a game would be as follows:

1. Disable the relevant GRF. Then all stations of that type turn into standard TTD stations.

2. Replace the problem stations with Something Else.

3. Re-enable the GRF.

Posted: 04 Sep 2005 12:47
by Aegir
Yeap, all the causes of this (grfids) have been fixed. This is just the game you play when upgrading station sets. Have fun :mrgreen:.