You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2014/04/02 21:20:15 UTC

[jira] [Commented] (PIVOT-938) Method getMouseLocation returns null

    [ https://issues.apache.org/jira/browse/PIVOT-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958063#comment-13958063 ] 

Roger Whitcomb commented on PIVOT-938:
--------------------------------------

Also merged the latest change to trunk:
Sending        .
Sending        wtk/src/org/apache/pivot/wtk/Component.java
Transmitting file data .
Committed revision 1583846.


> 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: Roger Whitcomb
>             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)