After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 418834 - Pickled objects are easily corrupted
Pickled objects are easily corrupted
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: gnome-sudoku
2.18.x
Other Linux
: Normal major
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-16 03:27 UTC by Robert Ancell
Modified: 2008-04-07 00:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Robert Ancell 2007-03-16 03:27:00 UTC
Sudoku uses Python's pickle methods to store game state etc to files. From a number of bug reports it appears that these file are easily corrupted e.g. during a crash leading to situations like #408837.

This corruption can lead to a loss of game history.

Sudoku needs to:
a) Be more paranoid when writing pickled objects
b) Handle corrupted input files gracefully
Comment 1 Robert Ancell 2007-03-16 03:33:21 UTC
Types of errors when loading:

EOFError (file is truncated?), see #408837
TypeError (trying to add dictionary entries to a list due to corrupted file?), see  #407566
Comment 2 Thomas Andersen 2007-03-16 15:52:26 UTC
Perhaps a solution to this and bug #393243 could be to use sqlite as a storage instead?
Comment 3 Thomas M. Hinkle 2008-04-07 00:51:13 UTC
This is fixed with the new simplified storage system. Pickles are still used, but on a one-file-per-game basis and only for saved games. This means that at worst you lose one game at a time.