Bounds checking on tooltip delay value #262

curttasker opened this Issue Aug 7, 2012 · 0 comments


None yet

1 participant

Anathema member

Issue first reported here

Preferences > System > Show tooltip for (seconds) Does not have any upper bounds checking on it. This allows the user to accidentally enter a huge number (9999999) which can cause Anathema to crash on launch:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.anathema.AnathemaBootLoader.main(
Caused by: java.lang.IllegalArgumentException: Invalid initial delay: -727380968

at javax.swing.Timer.setInitialDelay(Unknown Source)
at javax.swing.ToolTipManager.setDismissDelay(Unknown Source)
at net.sf.anathema.framework.environment.AnathemaEnvironment.initTooltip
at net.sf.anathema.Anathema.prepareEnvironment(
at net.sf.anathema.Anathema.startApplication(
... 5 more

For the user to fix it manually:

  • Run regedit.exe
  • Navigate to : HKEY_CURRENT_USER\Software\JavaSoft\Prefs\anathema\system
  • Change the value of ToolTipTime to 1.
  • Re-launch anathema, and it should be fine.

Needless to say, bounds checking needs to be added to this field to ensure that users can't accidentally run into this issue.

@curttasker curttasker added a commit that closed this issue Aug 7, 2012
@curttasker curttasker Tooltip delay - added upper bounds
Fixes #262.  The tooltip delay spinner in the preferences screen now caps its value
at 10 seconds.
@curttasker curttasker closed this in 2a4143e Aug 7, 2012
@curttasker curttasker was assigned Aug 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment