I actually think I fixed this already. But, it would be in 2.0.4. This
was PIVOT-927 already.
~Roger
On 3/17/14 9:43 AM, Sandro Martini (JIRA) wrote:
[
https://issues.apache.org/jira/browse/PIVOT-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938008#comment-13938008
]
Sandro Martini commented on PIVOT-938:
--------------------------------------
Hi, this is really strange, and could be something related to OS, Java Version,
etc ... anyway I think that a check against NPE could be added. Or when null,
returning a not null instance with defaults ?
Last, one time that the return object is null you see it always null since then
?
The workaround should be simple, but I can try to track it, but of course I'm
not sure that we find the original problem (assuming that we can fix it,
because could not be in Pivot code but in lower layers) ... what do you think ?
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
Assignee: Sandro Martini
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)