DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40686>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40686 Summary: ArrayIndexOutOfBoundsException in DOMTreeManager.appendGroup Product: Batik Version: 1.6 Platform: Other OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: SVG DOM AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I'm getting the following exception from time to time, when generating a complex chart graphic: java.lang.ArrayIndexOutOfBoundsException: 28 >= 10 at java.util.Vector.elementAt(Vector.java:432) at org.apache.batik.svggen.DOMTreeManager.appendGroup(DOMTreeManager.java:175) at org.apache.batik.svggen.DOMGroupManager.addElement(DOMGroupManager.java:159) at org.apache.batik.svggen.SVGGraphics2D.fill(SVGGraphics2D.java:1384) at org.apache.batik.ext.awt.g2d.AbstractGraphics2D.drawGlyphVector(AbstractGraphics2D.java:960) at sun.font.ExtendedTextSourceLabel.handleDraw(ExtendedTextSourceLabel.java:131) at sun.font.Decoration.drawTextAndDecorations(Decoration.java:99) at sun.font.ExtendedTextSourceLabel.draw(ExtendedTextSourceLabel.java:135) at java.awt.font.TextLine.draw(TextLine.java:550) at java.awt.font.TextLayout.draw(TextLayout.java:2699) at com.werum.chartgen.Axis.drawYAxis(Axis.java:313) at com.werum.chartgen.Axis.draw(Axis.java:130) at com.werum.chartgen.CoordPlane.drawAxes(CoordPlane.java:165) at com.werum.chartgen.CoordPlane.draw(CoordPlane.java:138) at com.werum.chartgen.Chart.draw(Chart.java:144) at com.werum.chartgen.Chart.draw(Chart.java:155) at com.werum.chartgen.test.TestChart02.run(TestChart02.java:87) at com.werum.chartgen.test.TestChart02.main(TestChart02.java:261) The code of method DOMTreeManager.appendGroup is rather short: public void appendGroup(Element group, DOMGroupManager groupManager){ topLevelGroup.appendChild(group); int nManagers = groupManagers.size(); for(int i=0; i<nManagers; i++){ DOMGroupManager gm = (DOMGroupManager)groupManagers.elementAt(i); if( gm != groupManager ) gm.recycleCurrentGroup(); } } I think the problem has something to do with the disposer thread running in the background and modifying the 'groupManagers' Vector during the iteration. This happens when SVGGraphics2D objects are disposed: public void dispose() { this.domTreeManager.removeGroupManager(this.domGroupManager); } My proposal is to protect the 'groupManagers' Vector against modifications during iterations in class DOMTreeManager. Because I have compiled batik from source, I will make the modification and test it in my environment. Currently I'm working on a Fedora Core5 Linux using Eclipse 3.2 and JDK 1.5.0_09, but I have seen the same problem on a Windows XP environment. Bernd -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
