Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#4771 closed defect (fixed)

KYRA: Error when loading non-existent savegame

Reported by: Templier Owned by: lordhoto
Priority: normal Component: Engine: Kyra
Version: Keywords:
Cc: Game:

Description

When trying to load a non-existent savegame using the keyboard shortcuts (CTRL+0/9), a dialog is shown telling the user the savegame does not exists, and then the debugger opens with an error (showing the same error string as in the error dialog).

Other engines (such as scumm) also show the error dialog but do not break into the debugger and allow the user to continue playing.

Tested with: Trunk and 1.0, running Kyrandia 2 and 3

Ticket imported from: #2954279. Ticket imported from: bugs/4771.

Attachments (2)

kyra-update_saveload_functions_to_return_kReadingFailed_when_savegame_not_found.patch (1.8 KB ) - added by Templier 15 years ago.
1 - Update saveload functions to return Common::kReadingFailed when the file cannot be opened
kyra-recover_from_invalid_savegame_slot.patch (5.5 KB ) - added by Templier 15 years ago.
2 - Check for proper savegame loading and fallback to normal path if it fails

Download all attachments as: .zip

Change History (7)

comment:1 by Templier, 15 years ago

Added a patch that handles recovering from a failed savegame load.

This is only the first step and the actual loading functions need to be updated to always return the same error code when the file opening fails, so that we can continue only in that case (and error out when we get an error in the middle of loading and end up with an undefined engine state).

by Templier, 15 years ago

1 - Update saveload functions to return Common::kReadingFailed when the file cannot be opened

by Templier, 15 years ago

2 - Check for proper savegame loading and fallback to normal path if it fails

comment:2 by Templier, 15 years ago

Updated the patch and added second part to always return Common::kReadingFailed when the savegame file cannot be opened.

In case another kind of error is returned, error() is called as before.

comment:3 by lordhoto, 15 years ago

Owner: set to lordhoto
Resolution: fixed
Status: newclosed
Summary: Kyra: Error when loading non-existent savegameKYRA: Error when loading non-existent savegame

comment:4 by lordhoto, 15 years ago

Fixed in r48089. Thanks for reporting.

comment:5 by digitall, 6 years ago

Component: Engine: Kyra
Note: See TracTickets for help on using tickets.