Menu

#23 Review Due Items button sometimes wrongly disabled

open
zw
None
5
2007-11-05
2007-11-05
zw
No

Left Heffalump overnight and went to review items the next day. Item browser told me there were 2 eligible, but button and menu item both disabled.

Not quite the same as 1774740 / 1774797, but the fixes for those should have fixed this one.

Discussion

  • zw

    zw - 2007-11-19

    Logged In: YES
    user_id=1866462
    Originator: YES

    A bit of added debug generates:

    review due items action, re-checking eligibility at Sun Nov 18 15:47:47 GMT 2007 recheckEligibility(MainFrame.java:724)
    eligibility set to false at Sun Nov 18 15:47:47 GMT 2007 recheckEligibility(MainFrame.java:730)
    ...
    timer-induced eligibility check at Mon Nov 19 03:10:05 GMT 2007 actionPerformed(EligibleItemMonitor.java:117)
    review due items action, re-checking eligibility at Mon Nov 19 03:10:05 GMT 2007 recheckEligibility(MainFrame.java:724)
    eligibility set to false at Mon Nov 19 03:10:05 GMT 2007 recheckEligibility(MainFrame.java:730))

    So the timer is either being set incorrectly or is going off prematurely. Can write a test to rule out the first very quickly - just grab GC as a Date, add calculated initialDelay and print the result. Other options: record desired fire time as a Date in closure, and when fired check current time is past Date, and if not then schedule again. Another way would be to try java.util.Timer - which takes a Date, not hand-calculated milliseconds - and wrap firing action in invokeLater() to put it on the EHT. Tradeoff.

     
  • zw

    zw - 2007-11-21

    Logged In: YES
    user_id=1866462
    Originator: YES

    Watching the same process for a while longer, early on the 20th I de-minimized the window and (perhaps coincidentally) the timer fired straight away:

    timer-induced eligibility check at Tue Nov 20 03:48:56 GMT 2007 (at actionPerformed(EligibleItemMonitor.java:117))
    review due items action, re-checking eligibility at Tue Nov 20 03:48:56 GMT 2007 (at recheckEligibility(MainFrame.java:724))
    eligibility set to true at Tue Nov 20 03:48:56 GMT 2007 (at recheckEligibility(MainFrame.java:730))

    Shortly before the same time early on the 21st I de-minimized again. No timer fired until exactly a day after the previous one:

    timer-induced eligibility check at Wed Nov 21 03:48:56 GMT 2007 (at actionPerformed(EligibleItemMonitor.java:117))
    review due items action, re-checking eligibility at Wed Nov 21 03:48:56 GMT 2007 (at recheckEligibility(MainFrame.java:724))
    eligibility set to true at Wed Nov 21 03:48:56 GMT 2007 (at recheckEligibility(MainFrame.java:730))

    Additional useful test: calculate the true number of milliseconds waited versus the actual.

     

Log in to post a comment.