OpenTTD / OpenTTD

OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
https://www.openttd.org/
Other
6.3k stars 887 forks source link

Crash on loading corrupted savegame #3714

Closed DorpsGek closed 14 years ago

DorpsGek commented 14 years ago

_kingzog opened the ticket and wrote:

Using Windows XP. Upon loading savegame 'NOT_REACHED triggered at line 719 of ..\src\saveload\vehicle_sl.cpp' error displayed.

Attachments

Reported version: 1.0.0-RC3 Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3714
DorpsGek commented 14 years ago

Rubidium wrote:

OpenTTD crashes on that savegame because it is corrupt.

The decompressor sends invalid data before it figures out that it is decompressing something corrupt, so OpenTTD tries to interpret something incorrect and it bails out. If I let the decompressor read a little the decompressor tells that the file is corrupted.

This means that the corruption most likely has occured on the file itself and not by OpenTTD saving it.

I have to agree that OpenTTD should handle this case more gracefully, but that requires a relatively big rework of the code for loading savegames. As it only happens on already corrupted savegames it's not that severe to rush a fix.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3714#comment7779
DorpsGek commented 14 years ago

Rubidium closed the ticket.

Reason for closing: Fixed

In r20819


This comment was imported from FlySpray: https://bugs.openttd.org/task/3714