GNOME Bugzilla – Bug 418834
Pickled objects are easily corrupted
Last modified: 2008-04-07 00:51:13 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
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
Perhaps a solution to this and bug #393243 could be to use sqlite as a storage instead?
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.