Hi Roger, [EMAIL PROTECTED] wrote on 05/02/2006 02:01:46 AM:
> Applying the obvious fix to this leads to another null reference. > Applying the obvious fix there leads to the attached patch and no more > exceptions. I may do this, at least in the short term but it highlights the fact that we shouldn't be peaking at the GN bounds out of the runnable queue's thread... > On 4/30/06, Roger Critchlow <[EMAIL PROTECTED]> wrote: > > I'm running JSVGCanvas inside JSVGScrollPane, started like this: > > > > scrollPane = new JSVGScrollPane(new JSVGCanvas(null, true, false)); > > svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC); > > > > Recently I began noticing these errors on the console, usually when > > I'm dragging some SVG component around on the Canvas, not scrolling: > > > > Fatal exception caught in Swing Interface: java.lang.NullPointerException > > java.lang.NullPointerException > > at org.apache.batik.swing.JSVGScrollPane. > getViewBoxRect(JSVGScrollPane.java:604) > > at org.apache.batik.swing.JSVGScrollPane$ScrollListener. > updateCompleted(JSVGScrollPane.java:408) > > at org.apache.batik.swing.svg.AbstractJSVGComponent$9. > run(AbstractJSVGComponent.java:1900) > > at java.awt.event.InvocationEvent.dispatch(Unknown Source) > > at java.awt.EventQueue.dispatchEvent(Unknown Source) > > at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) > > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > at java.awt.EventDispatchThread.run(Unknown Source) > > > > That line number corresponds to the last return statement here: > > > > GraphicsNode gn = canvas.getGraphicsNode(); > > if (gn == null) return null; > > > > return (Rectangle2D)gn.getBounds().clone(); > > > > This is a fairly recently updated SVN checkout of batik. > > > > -- rec -- > > > [attachment "JSVGScrollPane.patch" deleted by Thomas E. DeWeese/449433/EKC] > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
