Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#3251 closed defect (wontfix)

BS1: Crash while loading saved games

Reported by: SF/floydfeeble Owned by: sev-
Priority: normal Component: Engine: Sword1
Keywords: Cc:
Game: Broken Sword 1

Description

ScummVM version: SVN 0.10.pre 13 June

ScummVM frozes in, while clicking on the button Load.

Language: German Talkie
Plattform: Microsoft Windows XP [Version 5.1.2600]

I attached the Saved Games.

Ticket imported from: #1737801. Ticket imported from: bugs/3251.

Attachments (1)

sword1.zip (35.7 KB) - added by SF/floydfeeble 12 years ago.
Here i attached the Saved Games

Download all attachments as: .zip

Change History (15)

Changed 12 years ago by SF/floydfeeble

Attachment: sword1.zip added

Here i attached the Saved Games

comment:1 Changed 12 years ago by eriktorbjorn

I can reproduce the problem. It looks like your SAVEGAME.INF is somehow corrupted.

First of all, I'm surprised that it isn't compressed, but that's not in itself a problem.

More seriously, it's supposed to be a bunch of strings (savegame descriptions) separated by a linefeed (10), and terminated with 255. Yours, on the other hand, is a bunch of strings separated by carriage return / linefeed (13 10), and instead of the 255 at the end there's yet another CR+LF. Since Control::readSavegameDescriptions() doesn't check for end of file, it spins forever looking for that terminating 255.

Have you transferred the file between computers in some way? Maybe it misidentified the file as a text file, and decided to silently convert the line feeds to native Windows format?

Either way, I guess that function should be made a bit more robust...

comment:2 Changed 12 years ago by eriktorbjorn

In addition, one of the savegame names is long enough to cause an overflow in the 32-byte buffer reserved for each savegame name: "goto girl without being searched"

I don't know how that could have happened, since the save dialog is supposed to only allow 31 characters (not 32 -- one character is reserved for the string terminator), but maybe that sanity check isn't as old as I thought it was...

So, to get it to accept your SAVEGAME.INF, I have to make the following changes:

* Test for end of file.
* Test for invalid characters.
* Test for too long strings.

All sensible precautions, of course, but I'm still curious how your file could have ended up that way. Sometimes, I really dislike the engines that use a separate "index" file like this for their savegames. If something happens to it, you may not be able to recover...

I've applied my patch. Could you try with the next snapshot and see if you're able to load your savegames. (I'm not, but that's hopefully because I have the English version.)

comment:3 Changed 12 years ago by SF/floydfeeble

Hello,

this saved games are from the original brocken sword 1 game. i found them on a disc from the year 2000. with the original game it works without problems.

Therefore i thought there is an error in the scummvm engine

comment:4 Changed 12 years ago by SF/floydfeeble

Please test whether you can reproduce this bug
with the latest daily SVN build which you can find
at the bottom of our downloads page:
<http://www.scummvm.org/downloads.php>.

comment:5 Changed 12 years ago by eriktorbjorn

ScummVM does not generally support the original savegames: http://www.scummvm.org/faq.php#AEN115

I don't know about Broken Sword 1.

comment:6 Changed 12 years ago by SF/floydfeeble

In the feeble files i can use the old saved games, as well as in other games, like monkey island.

Therefore i thougt i can also use the saved games from broken sword 1

comment:7 Changed 12 years ago by fingolfin

You can use old *ScummVM* savegames, aye. But you can *not* use savegames made with the original engines of e.g. Monkey Island.

comment:8 Changed 12 years ago by eriktorbjorn

Owner: set to lavosspawn

comment:9 Changed 12 years ago by eriktorbjorn

The AGOS engine may be savegame compatible with the original, though. At least with the DOS/Windows versions.

I'm tempted to close this bug report as invalid, but I would like to hear from lavosspawn if the Broken Sword 1 engine was ever intended to support the original savegames. (If not, it makes the naming scheme for the savegame files even more annoying.)

comment:10 Changed 12 years ago by lavosspawn

The fact that original savegames are unsupported is kind of a bug. I should better fix it.
However, there're at least three different releases of bs1, I'm not sure if scummvm would ever be able to support all of them...

comment:11 Changed 12 years ago by fingolfin

Summary: SWORD1: Crash while loading saved gamesBS1: Crash while loading saved games

comment:12 Changed 12 years ago by fingolfin

Nah, that's definitely *not* to be considered a bug, at most it's a missing feature. As such I propose to close this report as invalid; if somebody is interested in support for "original" BS1 saves, file a feature request for it.

comment:13 Changed 11 years ago by sev-

Closing as invalid.

comment:14 Changed 11 years ago by sev-

Owner: changed from lavosspawn to sev-
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.