[Marble-bugs] [Bug 299388] [Patch] Strange behavior in Marble Clock

Dennis Nienhüser earthwings at gentoo.org
Fri May 4 20:57:50 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=299388

Dennis Nienhüser <earthwings at gentoo.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
                 CC|                            |earthwings at gentoo.org
            Summary|Strange behavior in Marble  |[Patch] Strange behavior in
                   |Clock                       |Marble Clock
     Ever confirmed|0                           |1
                 OS|MS Windows                  |All

--- Comment #1 from Dennis Nienhüser <earthwings at gentoo.org> ---
For the 40/20 combination, the behavior is caused by an (undocumented)
restriction that the speed cannot be larger than the update interval: Marble
will not issue the timeChanged() signal more than once a second. So while one
would expect updates at 20 seconds / 40 = 500 ms, instead each 1000 ms an
update is issued.

For the 10/20 combination, you're running into another issue: The time between
updates should be 20 seconds / 10 = 2 seconds. Marble calculates that timeout
sometimes correct, sometimes wrong as 0, where another fallback chimes in and
sets it to one second. So you get updates sometimes after 2 seconds (advancing
correctly 20 seconds) but often early after 1 second (advancing only 10
seconds).

Note that in both cases the time reported is correct. It's just the
announcement of the timeChanged() signal that is emitted at the wrong time.

Here's a log of the 10/20 combination and current master showing the described
behavior:

System clock "Fri May 4 20:00:33 2012" , marble internal  "Fri May 4 20:00:59
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:34 2012" , marble internal  "Fri May 4 20:01:09
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:35 2012" , marble internal  "Fri May 4 20:01:20
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:36 2012" , marble internal  "Fri May 4 20:01:30
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:37 2012" , marble internal  "Fri May 4 20:01:40
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:38 2012" , marble internal  "Fri May 4 20:01:50
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:39 2012" , marble internal  "Fri May 4 20:02:00
2012" , MarbleClock: will sleep for  1999 
System clock "Fri May 4 20:00:41 2012" , marble internal  "Fri May 4 20:02:20
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:42 2012" , marble internal  "Fri May 4 20:02:30
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:43 2012" , marble internal  "Fri May 4 20:02:40
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:44 2012" , marble internal  "Fri May 4 20:02:50
2012" , MarbleClock: will sleep for  1000 
System clock "Fri May 4 20:00:45 2012" , marble internal  "Fri May 4 20:03:00
2012" , MarbleClock: will sleep for  1998 
System clock "Fri May 4 20:00:47 2012" , marble internal  "Fri May 4 20:03:20
2012" , MarbleClock: will sleep for  1000

Note how it fails to sleep for the correct timeout (~2000) for all but two
times.
The patch at https://git.reviewboard.kde.org/r/104861/ fixes this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Marble-bugs mailing list