bugXBoard - Bugs: bug #27642, Clock jumps strangely in engine...

 
 

bug #27642: Clock jumps strangely in engine mode

Submitted by:  None
Submitted on:  Fri 09 Oct 2009 07:31:33 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 11 Oct 2009 05:06:56 PM UTC, comment #8:

thanks for testing and reporting the bug in the first place.

Arun Persaud <apersaud>
Project Administrator
Sun 11 Oct 2009 08:29:29 AM UTC, comment #7:

I don't know, if I (as the original submitter) am supposed to post my test result. Nevertheless, it works now. Also the Segfault is repaired. Thanks.

Anonymous
Sat 10 Oct 2009 03:31:25 PM UTC, comment #6:

fixed in git (commit de954fa0f31cc935b5ad61819a04de2713cd98ed)

Please test.

Arun Persaud <apersaud>
Project Administrator
Sat 10 Oct 2009 03:22:17 PM UTC, comment #5:

comment #2:

>Additionally I just saw this:
>xboard -tc 0 -inc 20
>xboard: bad timeControl option 0
>Segmentation fault
>
>Again, 4.2.7 handles this case correctly.


This should be already fixed in git. Someone else had reported this already. (commit f9fe58c6ea5c0938364cd9bd0b434ee66e0f7272)

Let me know if it doesn't work for you.

ARUN

Arun Persaud <apersaud>
Project Administrator
Sat 10 Oct 2009 06:18:56 AM UTC, comment #4:

OK, thanks for tracing this down. I had gotten as far as concluding that the first tick after a clock switch was always 1000 ms, rather than the remaining fractional second on the new side-to-move's clock, and that this was compensated only on the next tick, but had not found the reason yet.

The problem is that SwitchClock() uses forwardMostMove, so after the 'bare' patch it was using the time of the wrong player to decide on the tick length. The proper fix is to move SwitchClocks() and the two timeRemaining-referring lines behind it to after the forwardMostMove++.

This means that the time for performing the move on the board is now added to the time of the player that just moved, rather than the player that is going to move, but this should not really make a difference, as this should be only micro-seconds.

Again, thanks for spotting the bug, and for locating it!
H.G. Muller

Anonymous
Fri 09 Oct 2009 10:06:24 PM UTC, comment #3:

Between 4.4.0.alpha1 and alpha2 there was a change in function
MakeMove in backend.c:
"forwardMostMove++;" was shifted down and all references in between changed. These explanation comments were added:

// forwardMostMove++; // [HGM] bare: moved downstream
...
forwardMostMove++; // [HGM] bare: moved to after ApplyMove, to make sure clock interrupt finds complete board

When I undo these changes, clock works normally again.
This also effects the moment when -inc gets added, as suspected
in my last post.

Anonymous
Fri 09 Oct 2009 03:37:41 PM UTC, comment #2:

"-niceEngines 20" doesn't change anything.
You have to try several times. Sometimes the 2nd second
is almost of normal length and sometimes it's almost
completely skipped.

If your clock is already at less than 10secs ,say 8.3
after engine moves your clock jumps to 7.9 then remains there
for a short time then jumps to 6.9 then continues running normally in 0.1 decrements.
Looks almost as if the clock isn't drawn to the screen for a short time after engine has moved.

Probably related: In xboard 4.2.7 an -inc gets added to your
clock right after your move. With the new xboard, the inc is added to your clock after the engine has moved.

Additionally I just saw this:
xboard -tc 0 -inc 20
xboard: bad timeControl option 0
Segmentation fault

Again, 4.2.7 handles this case correctly.

Anonymous
Fri 09 Oct 2009 10:24:15 AM UTC, comment #1:

Does this also happen when you run XBoard with the option "-niceEngines 20"? It could be that what you see is the result of the engins and xboard competing for CPU. I have no explanation why such contention would be different than in 4.2.7, but nothing was changed in this area compared to 4.2.7.

H.G. Muller

Anonymous
Fri 09 Oct 2009 07:31:33 AM UTC, original submission:

Start xboard with engine(s) and "-tc 3 -inc 0"
After a move is made (not book move) opponents clock gets
started. The first second seems to be always exactly a second.
But then a shorter (varying length) second gets inserted.
This was not the case in version 4.2.7.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by apersaud (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Oct 2009 05:06:56 PM UTCapersaudOpen/ClosedOpen=>Closed
      StatusReady For Test=>Fixed
    Sat 10 Oct 2009 03:31:25 PM UTCapersaudStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1