GNOME Bugzilla – Bug 563319
Sudoku timer completion is really off
Last modified: 2010-04-06 19:00:33 UTC
Please describe the problem: I start a new puzzle (hard) and complete the puzzle in about 18 minutes and it reports that it took several hours. Steps to reproduce: 1. Start a new hard puzzle 2. Complete the puzzle 3. View the completion time and compare to time elapsed between 1&2 Actual results: I have screen shots demonstrating what happens. Expected results: I would expect the time to be the same (or at least close) to the actual elapsed time. Does this happen every time? Yes Other information:
Created attachment 123981 [details] here I am starting the puzzle (see time)
Created attachment 123982 [details] here is a screenshot immediately at the beginning of the game (notice start time)
Created attachment 123983 [details] here is a screenshot at the end of the game (notice descrepancy in time) About 18 minutes elapsed on my system clock and in the rest of the universe; however, Sudoku reports that 7 hours and 44 minutes have elapsed. I only noticed this after upgrading from Ubuntu 8.04 to 8.10. Any ideas for the discrepancy?
Hi Anthony can you tell me the exact version of gnome-sudoku? We fixed some timer related bugs in 2.24.1.1. It could possibly be related to a game being started with version 2.24.1
Thomas - Yep, I am using 2.24.1 - I suspect you have it fixed and it just needs to work its way into the Debian and Ubuntu trees. If I get a chance, I'll download the latest version and see if the problem is still there. If it is possible to re-open bugs, I would go ahead and mark this as fixed and if it really is a continuing problem I will request that it be re-opened. Thanks for all you do for open source! Peace - Anthony
(In reply to comment #4) > Hi Anthony > > can you tell me the exact version of gnome-sudoku? We fixed some timer related > bugs in 2.24.1.1. It could possibly be related to a game being started with > version 2.24.1 > I am experiencing the same problem with 2.26.0, on Ubuntu 9.04. The time discrepancy in on the order of minutes instead of hours for me, but the problem is essentially the same.
Thanks for testing this on 2.26. One thing that could be a big help would be if you are able to attach the game file for the finished game. It could help us narrow down if the problem is in displaying/formating the time or the actual time "counting". You can find the game files for the finished games in ~/.sudoku/finished The filename will be a list of the numbers from the sudoku starting top left and going right. Please attach a screenshot of the dialog where the wrong time is shown as well. Also a rough estimate of the time it really took to finish the game.
Created attachment 132342 [details] [review] test-timer.patch I think the problem is in toggle_timing, self.tot_time_complete += end_time - self.__absolute_start_time__ It should be '=', instead of '+='. The patch contains several print statement. Use the following trick to test: 1.First wait for about 10 secs. 2.Press 'Minimize Window' on the right up corner (don't use panel's window-list or Alt+F9) and then resume it. Repeat several times and you will see tot_time_complete is increased rapidly.
Created attachment 132382 [details] [review] reorganize timer code tot_time => active_time tot_time_complete => self.total_time Also tried to keep compatibility with old saved game.
Created attachment 132449 [details] v2.26.0 finished game file w/ bad time
Created attachment 132450 [details] v2.26.0 finished game file w/ bad time (2)
(In reply to comment #7) > Thanks for testing this on 2.26. > > One thing that could be a big help would be if you are able to attach the game > file for the finished game. It could help us narrow down if the problem is in > displaying/formating the time or the actual time "counting". > > You can find the game files for the finished games in ~/.sudoku/finished > The filename will be a list of the numbers from the sudoku starting top left > and going right. Uploaded. > Please attach a screenshot of the dialog where the wrong time is shown as well. > Also a rough estimate of the time it really took to finish the game. I can't seem to reproduce the bug now, with no change in my steps, so I haven't included a screenshot. On the two finished game files I attached, the actual time it took me to play (in wall clock time) was around 15 minutes, which was about the same as the reported actual time.
Committed to trunk with small update. Thanks a ton Zhang. The code is a lot more clean now. http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=9034
Closing as this should be fixed with the latest timer code fixes. Please reopen if the problem still appears in version 2.31.1