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=40 686>. 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 a> 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: batik-devxmlgraphics.apache.org ReportedBy: bernd.fechnerwerum.de 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(DOMTreeMa nager.java:175) at org.apache.batik.svggen.DOMGroupManager.addElement(DOMGroupM anager.java:159) at org.apache.batik.svggen.SVGGraphics2D.fill(SVGGraphics2D.jav a:1384) at org.apache.batik.ext.awt.g2d.AbstractGraphics2D.drawGlyphVec tor(AbstractGraphics2D.java:960) at sun.font.ExtendedTextSourceLabel.handleDraw(ExtendedTextSour ceLabel.java:131) at sun.font.Decoration.drawTextAndDecorations(Decoration.java:9 9) at sun.font.ExtendedTextSourceLabel.draw(ExtendedTextSourceLabe l.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:26 1) 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=ema il ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. ------------------------------------------------------------ --------- To unsubscribe, e-mail: batik-dev-unsubscribexmlgraphics.apache.org For additional commands, e-mail: batik-dev-helpxmlgraphics.apache.org
about | contact Other archives ( Real Estate discussion Medical topics )
Mailing lists
Newsgroups
RFC archive