| Summary: | memory exception , with svg file for a pdf export | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | joel <joel.moreau> | ||||
| Component: | BIRT | Assignee: | Birt-ReportEngine-inbox <Birt-ReportEngine-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | Xiaoying Gu <bluesoldier> | ||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | bluesoldier, jouyang, wyan, yChen | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.7.0 RC2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | Obsolete | ||||||
| Attachments: |
|
||||||
|
Description
joel
Created attachment 190160 [details]
datas to reproduce the problem. In comment I put the result
java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.SinglePixelPackedSampleModel.createDataBuffer(Unknown Source)
at java.awt.image.Raster.createWritableRaster(Unknown Source)
at org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers(Unknown Source)
at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
at org.eclipse.birt.report.engine.util.SvgFile.transSvgToArray(SvgFile.java:78)
at org.eclipse.birt.report.engine.emitter.ImageReader.readImage(ImageReader.java:206)
at org.eclipse.birt.report.engine.emitter.ImageReader.readImage(ImageReader.java:190)
at org.eclipse.birt.report.engine.emitter.ImageReader.readImage(ImageReader.java:179)
at org.eclipse.birt.report.engine.emitter.ImageReader.read(ImageReader.java:80)
at org.eclipse.birt.report.engine.nLayout.area.impl.ImageAreaLayout.initialize(ImageAreaLayout.java:83)
at org.eclipse.birt.report.engine.nLayout.area.impl.ImageAreaLayout.layout(ImageAreaLayout.java:72)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContent(LayoutEngine.java:488)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startImage(ContentEmitterAdapter.java:174)
at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startImage(CompositeContentEmitter.java:274)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:74)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startContent(HTMLTableLayoutEmitter.java:146)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startImage(ContentEmitterAdapter.java:174)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:74)
at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:116)
at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287)
at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
The SVG's size is 6906*4619, if we convert it to 32 color image, it need 6906*4619*4=121M bytes. so you need increase the JVM's max memory and retry. (In reply to comment #2) > The SVG's size is 6906*4619, if we convert it to 32 color image, it need > 6906*4619*4=121M bytes. so you need increase the JVM's max memory and retry. I thought to this problem. I tried with 500M Set as invalid, the conversion needs more than 121m which is for raw image data only. User should set the max memory size more than 500m for safe sake. Tried with -Xmx 500m, the attached example can be rendered to pdf. I don't understand why we need 500M to draw a bitmap of a file of 3M. Why the dimensions of the canevas depend on dimensions of the svg file and not of maximal dimensions of the bitmap ? Agree, let see if we can use the image's size to reduce the memory used to converting SVG. Won't fix. Please ignore comment 8. The bug is fixed. Please try our new 3.7 build. Verified in daily build 3.7.0.v20100518-1359. VM args in eclipse.ini: -vmargs -Xms40m -Xmx256m |