GNOME Bugzilla – Bug 493886
Corruption of saved games
Last modified: 2008-12-12 17:17:23 UTC
gnome-sudoku crashes when starting new very difficult game. (SVN trunk) Traceback (most recent call last):
+ Trace 175524
ret = fun(ui,*args,**kwargs)
self.select_game()
self.gsd.change_grid(choice[1],9)
self.setup_grid(grid,group_size)
self.grid = sudoku.InteractiveSudoku(grid,group_size=group_size)
SudokuSolver.__init__(self,grid,verbose,group_size)
SudokuGrid.__init__(self,grid,verbose=verbose,group_size=group_size)
grid.append([int(i) for i in g[start:start+side]])
*** Bug 493887 has been marked as a duplicate of this bug. ***
*** Bug 493889 has been marked as a duplicate of this bug. ***
*** Bug 497540 has been marked as a duplicate of this bug. ***
This has been reported to Fedora's bugzilla too, and this interesting comment was made there: "In rawhide gnome-games there appears to be a difficulty setting asked before starting a new game. Depending on which one gets picked a file in /usr/share/gnome-sudoku/puzzles/ gets loaded. The very_hard one looks corrupt (just by comparing it to some of the other ones in vim)" See: https://bugzilla.redhat.com/show_bug.cgi?id=391241 For the Fedora bug report on this.
This is yet another critical bugreport related to corrpution of saved games in Sudoku since this feature was re-enabled in 2.21.1. I disabled this feature in the 2.20.0 release because of the huge amount of bugreports related to corrution of savegames. I fear that once this new save/load code goes into production use, we will again be flooded with bugreports related to corrupted savegames.
This is not a saved game but rather one that was distributed with the game or generated. Hans, could you please attach the corrupted file? There should be some validation of game files before they are loaded. I think Tom might be working on such code. Tom?
Invalid puzzles simply should be ignored. The new system should be substantially more robust -- but obviously we need to suppress tracebacks like the above from reaching users. Of course, it'd be nice to know how the corrupt line got to be corrupt exactly, but regardless, we should be able to safely ignore it and move on to other puzzles.
Ok -- I've just looked over the code. There is a check in place to check validity of the puzzle. Apparently it's not working, so getting an attachment of one of the files triggering this error would be quite helpful if any of the original bug reporters can provide that. The question is not whether the file is corrupt, but why it's corrupt in a way that my check isn't picking up on.
Created attachment 99454 [details] The requested corrupt level file causing the problems Here you are.
Thanks for the attachment. I've confirmed that my latest update to svn (rev 6973) will handle that corrupt file without throwing a traceback (it will print a warning about the corrupt line for debugging purposes).
*** Bug 507810 has been marked as a duplicate of this bug. ***
*** Bug 540919 has been marked as a duplicate of this bug. ***