Menu

Timer field replaced by function call text

Help
ketemphor
2011-07-07
2013-05-01
  • ketemphor

    ketemphor - 2011-07-07

    Hey, I just loaded the jnlp file on my laptop and the left-hand field that normally holds the time displays the following instead:
    java.awt.peer.WindowPeer.updateAlwaysOnTop()

    If I hover over it and scroll the mouse wheel, I can temporarily see the times and previous tasks as I'm used to, but when it goes back to 'idle' the same text shows up again.

    Running Java SE 7 build 1.7.0-ea-b119 on XP SP3.

    The right-click menu popup is also vertically compressed.

    I've tried deleting the cache and redownloading, running in online and offline mode to no avail.

     
  • ketemphor

    ketemphor - 2011-07-07

    Sorry, just noticed a mistake in my post, I meant the right-hand field with the timer, not left.

     
  • Russell Black

    Russell Black - 2011-07-07

    Choose "view all timecards" from the menu, then locate the file called "stderr.txt".  Does that file contain any error information?

     
  • ketemphor

    ketemphor - 2011-08-09

    Sorry about the long delay in replying.  I didn't have to use this laptop for some time and the issue slipped my mind.

    stderr.log contains multiple entries of the following:

    java.lang.NoSuchMethodException: java.awt.peer.WindowPeer.updateAlwaysOnTop()
        at java.lang.Class.getMethod(Unknown Source)
        at tracker.TimeTracker$24.run(TimeTracker.java:431)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)
    
     
  • Thorben

    Thorben - 2011-10-13

    Maybe the problem is in the file TimeTacker.java:

                        boolean is16 = "1.6".equals(System.getProperty("java.specification.version")); //$NON-NLS-1$ //$NON-NLS-2$
                        if (is16)
                        {
                            WindowPeer.class.getMethod("setAlwaysOnTop", Boolean.TYPE).invoke(wp, true); //$NON-NLS-1$
                        }
                        else
                        {
                            WindowPeer.class.getMethod("updateAlwaysOnTop").invoke(wp); //$NON-NLS-1$
                        }
    

    You java version is 7 aka 1.7 and probably the special case for 1.6 is also needed.

     
  • Russell Black

    Russell Black - 2011-10-20

    You're right.  I have made the change you suggested. Thanks!

     
  • Russell Black

    Russell Black - 2011-10-20

    Let me know if it is still not working for you

     
    • Misura

      Misura - 2013-04-30

      Hey Russel,

      I would love to fix this issue where do I find TimeTracker.java so I can edit it? I'm running windows 7 64x

      Thanks!

       

      Last edit: Misura 2013-04-30
  • Russell Black

    Russell Black - 2013-04-30

    Follow the "Code" link at the top of this page.

     
  • Misura

    Misura - 2013-04-30

    Alright, I downloaded the tinytimetracker package that has the src, etc. I went into TimeTracker.java file but what should I update in it? Something like this?

    boolean is17 = "1.7".equals(System.getProperty("java.specification.version")); //$NON-NLS-1$ //$NON-NLS-2$
                        if (is17)
                        {
                            WindowPeer.class.getMethod("setAlwaysOnTop", Boolean.TYPE).invoke(wp, true); //$NON-NLS-1$
                        }
                        else
                        {
                            WindowPeer.class.getMethod("updateAlwaysOnTop").invoke(wp); //$NON-NLS-1$
                        }
    

    After I have made the update, what do I do? Do I then run tinytimetracker.jnlp in the root dir and it will run with the applied changes? Any detailed information on steps to fix this problem would be much appreciated!

    Thanks!

     
  • Russell Black

    Russell Black - 2013-05-01

    I have pushed out a fix for this. Try restarting tiny-time-tracker and it should update to the latest jar with the fix.

     

Log in to post a comment.