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 493886 - Corruption of saved games
Corruption of saved games
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: gnome-sudoku
2.21.x
Other Linux
: Immediate blocker
: ---
Assigned To: Thomas M. Hinkle
GNOME Games maintainers
: 493887 493889 497540 507810 540919 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-05 20:50 UTC by Andreas Røsdal
Modified: 2008-12-12 17:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The requested corrupt level file causing the problems (3.50 KB, text/plain)
2007-11-21 21:30 UTC, Hans de Goede
Details

Description Andreas Røsdal 2007-11-05 20:50:10 UTC
gnome-sudoku crashes when starting new very difficult game. (SVN trunk)


Traceback (most recent call last):
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 64 in _
    ret = fun(ui,*args,**kwargs)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 514 in new_cb
    self.select_game()
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 64 in _
    ret = fun(ui,*args,**kwargs)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 212 in select_game
    self.gsd.change_grid(choice[1],9)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gsudoku.py", line 1016 in change_grid
    self.setup_grid(grid,group_size)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/gsudoku.py", line 1048 in setup_grid
    self.grid = sudoku.InteractiveSudoku(grid,group_size=group_size)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/sudoku.py", line 614 in __init__
    SudokuSolver.__init__(self,grid,verbose,group_size)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/sudoku.py", line 255 in __init__
    SudokuGrid.__init__(self,grid,verbose=verbose,group_size=group_size)
  • File "/usr/lib64/python2.5/site-packages/gnome_sudoku/sudoku.py", line 92 in __init__
    grid.append([int(i) for i in g[start:start+side]])
ValueError: invalid literal for int() with base 10: ''

Comment 1 Andreas Røsdal 2007-11-05 20:53:04 UTC
*** Bug 493887 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Røsdal 2007-11-05 20:53:11 UTC
*** Bug 493889 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Andersen 2007-11-18 14:57:23 UTC
*** Bug 497540 has been marked as a duplicate of this bug. ***
Comment 4 Hans de Goede 2007-11-20 21:27:46 UTC
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.
Comment 5 Andreas Røsdal 2007-11-20 21:41:23 UTC
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. 
Comment 6 Thomas Andersen 2007-11-20 22:50:36 UTC
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?
Comment 7 Thomas M. Hinkle 2007-11-21 01:57:14 UTC
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.
Comment 8 Thomas M. Hinkle 2007-11-21 03:43:23 UTC
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.
Comment 9 Hans de Goede 2007-11-21 21:30:34 UTC
Created attachment 99454 [details]
The requested corrupt level file causing the problems

Here you are.
Comment 10 Thomas M. Hinkle 2007-11-21 21:57:28 UTC
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).
Comment 11 Thomas Andersen 2008-01-10 22:19:49 UTC
*** Bug 507810 has been marked as a duplicate of this bug. ***
Comment 12 Tero Keinänen 2008-12-12 17:17:23 UTC
*** Bug 540919 has been marked as a duplicate of this bug. ***