Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-938

Method getMouseLocation returns null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.4, 2.1
    • None
    • None

    Description

      Recently my application crashed with following stack trace:

      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - java.lang.NullPointerException
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at org.apache.pivot.wtk.Component$1.run(Component.java:2771)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1607)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventQueue.access$200(Unknown Source)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventQueue$3.run(Unknown Source)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventQueue$3.run(Unknown Source)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.security.AccessController.doPrivileged(Native Method)
      ERROR 2014-03-08 18:42:26,265 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventQueue.dispatchEvent(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      ERROR 2014-03-08 18:42:26,281 AWT-EventQueue-0 pl.com.stam.bs3lsm.BarrelS3App - at java.awt.EventDispatchThread.run(Unknown Source)

      I traced error to following piece of code:

      triggerTooltipCallback = ApplicationContext.scheduleCallback(new Runnable() {
      @Override
      public void run()

      { Point mouseLocationLocal = getMouseLocation(); componentTooltipListeners.tooltipTriggered(Component.this, mouseLocationLocal.x, mouseLocationLocal.y); }

      }, tooltipDelay);

      It seem like value returned from getMouseLocation() is null for some reason. Unfortunately I am not able to reproduce this error. Do you have any ideas how to avoid such problems in future?

      Attachments

        Issue Links

          Activity

            People

              rwhitcomb Roger Lee Whitcomb
              lhanusiak Ɓukasz Hanusiak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: