Hi dear batik friends,

 

I’m getting a NullPointerException when moving over an element which has a <title>-Tag attached and so should display the tooltip. The exception is only thrown once in a while, not always when I move over the element, because sometimes it works and the tooltip pops up.

 

The line in the JSVGCanvas which throws the exception is following

 

                  SVGDocument doc = (SVGDocument)elt.getOwnerDocument();

 

So that means that my element has no ownerdocument… as it is launched from the EventDispatchThread I’m not sure how to avoid this exception by checking that my element is not null??

 

java.lang.NullPointerException

      at org.apache.batik.swing.JSVGCanvas$CanvasUserAgent.setToolTip(JSVGCanvas.java:1013)

      at org.apache.batik.swing.JSVGCanvas$CanvasUserAgent.handleElement(JSVGCanvas.java:906)

      at org.apache.batik.swing.svg.AbstractJSVGComponent$30.run(AbstractJSVGComponent.java:2742)

      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)

      at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)

      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

      at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

 

Had anyone had a similar issue?

 

Thanks for your great help…

 

Dominik Steiner

Reply via email to