[ https://issues.apache.org/jira/browse/PIVOT-938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandro Martini updated PIVOT-938: --------------------------------- Fix Version/s: 2.1 2.0.4 > Method getMouseLocation returns null > ------------------------------------ > > Key: PIVOT-938 > URL: https://issues.apache.org/jira/browse/PIVOT-938 > Project: Pivot > Issue Type: Bug > Affects Versions: 2.0.3 > Reporter: Ćukasz Hanusiak > Fix For: 2.0.4, 2.1 > > > 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? -- This message was sent by Atlassian JIRA (v6.2#6252)