I'm getting occasional random (that is, non-repeatable) NullPointerExceptions and/or DOMExceptions when trying to load an SVG document into a JSVGCanvas. The traceback from the NullPointerException to the command line window appears as follows:
java.lang.NullPointerException at org.apache.batik.bridge.UpdateManager.<init>(Unknown Source) at org.apache.batik.swing.svg.JSVGComponent$SVGListener.gvtBuildCompleted(Unknown Source) at org.apache.batik.swing.svg.GVTTreeBuilder$2.dispatch(Unknown Source) at org.apache.batik.util.EventDispatcher.dispatchEvent(Unknown Source) at org.apache.batik.util.EventDispatcher.fireEvent(Unknown Source) at org.apache.batik.util.EventDispatcher$1.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:171) 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) The DOMException comes in the form of a popup window: SVG Error: file:/home/spl/src/java/jibber/test/mouse/001.svg: The attribute "font-family" represents an invalid CSS value ("null"). Original message: org.w3c.dom.DOMException: file:/home/spl/src/java/jibber/test/mouse/001.svg: The attribute "font-family" represents an invalid CSS value ("null"). Original message: at org.apache.batik.css.engine.CSSEngine.parsePropertyValue(Unknown Source) at org.apache.batik.bridge.BridgeContext.getDefaultFontFamily(Unknown Source) at org.apache.batik.css.engine.value.css2.FontFamilyManager.computeValue(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source) at org.apache.batik.bridge.CSSUtilities.getComputedStyle(Unknown Source) at org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(Unknown Source) at org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(Unknown Source) at org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(Unknown Source) at org.apache.batik.bridge.SVGTextElementBridge.computeLaidoutText(Unknown Source) at org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source) I assume I'm doing evil and stomping on something but since these errors occur in a thread that doesn't belong to me, it's difficult for me to determine exactly what. The application continues to run and display my document as if no error occurred. Is there any way of forcing the renderer to run synchronously? Is there something I should be locking/synchronizing to prevent this? I'm running Batik 1.5.1 and Java sdk1.4.2_02 under Red Hat Linux: tirebiter:spl> uname -a Linux tirebiter 2.4.21-15.0.2.ELsmp #1 SMP Wed Jun 16 22:52:07 EDT 2004 i686 i686 i386 GNU/Linux Clues and RTFMs gratefully accepted. Thanx. spl --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]