Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343741 - ArrayIndexOutOfBoundsException: 4 exception while generating PDF from .rptdocument
Summary: ArrayIndexOutOfBoundsException: 4 exception while generating PDF from .rptdoc...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7.0 M7   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-25 11:13 EDT by raghunadh.madamanchi CLA
Modified: 2011-05-13 04:54 EDT (History)
2 users (show)

See Also:


Attachments
sample report (4.10 KB, application/x-zip-compressed)
2011-04-25 22:46 EDT, Xiaoying Gu CLA
no flags Details
sample rptdesign, which i am using. this is giving the problem (58.03 KB, application/octet-stream)
2011-04-26 13:56 EDT, raghunadh.madamanchi CLA
no flags Details
reportdocument (172.07 KB, application/octet-stream)
2011-04-27 12:50 EDT, raghunadh.madamanchi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description raghunadh.madamanchi CLA 2011-04-25 11:13:19 EDT
Build Identifier: 2.5.0

pr 25, 2011 11:46:23 AM org.eclipse.birt.report.engine.api.impl.RenderTask render
SEVERE: An error happened while running the report. Cause:
java.lang.ArrayIndexOutOfBoundsException: 4
	at org.eclipse.birt.report.engine.nLayout.area.impl.ConcreteImageLayout.getArea(ImageAreaLayout.java:762)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ConcreteImageLayout.createImageMap(ImageAreaLayout.java:606)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ConcreteImageLayout.processChartLegend(ImageAreaLayout.java:579)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ConcreteImageLayout.init(ImageAreaLayout.java:527)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ConcreteImageLayout.layout(ImageAreaLayout.java:394)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ImageAreaLayout.layout(ImageAreaLayout.java:74)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContent(LayoutEngine.java:403)
	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.HTMLTableLayoutEmitter.startContent(HTMLTableLayoutEmitter.java:144)
	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:282)
	at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:49)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:134)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:69)
	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:135)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:106)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:155)
	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:135)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:69)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:112)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:135)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:69)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)
	at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:525)
	at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:220)
	

Reproducible: Always

Steps to Reproduce:
1.created .rptdocument.
2.try to convert to PDF using IRenderTask.render();
3.Above mention exception is thrown, when render() method is called
Comment 1 raghunadh.madamanchi CLA 2011-04-25 11:16:43 EDT
This is happening when Converting Pie chart to PDF.
when the Dataset of the PieChart contains the 0  value, then above mentioned Exception is getting thrown.
If the the Pie chart data set does not contain the 0 value, we can able to convert to PDF.
Comment 2 Xiaoying Gu CLA 2011-04-25 22:43:57 EDT
Hi,

I created a simple report using pie chart contains 0 value. But I can not reproduce this issue in the 2.5.0 release. Please see my attachment.
Comment 3 Xiaoying Gu CLA 2011-04-25 22:46:07 EDT
Created attachment 194032 [details]
sample report
Comment 4 raghunadh.madamanchi CLA 2011-04-26 13:49:40 EDT
(In reply to comment #3)
> Created attachment 194032 [details]
> sample report

Pie chart report need to be converted to the PDF. while generating PDF from the Pie chart , above mention exception is getting thrown.
Comment 5 raghunadh.madamanchi CLA 2011-04-26 13:56:49 EDT
Created attachment 194083 [details]
sample rptdesign, which i am using. this is giving the problem

This is the rptdesign, from this i am able to generate the pie chart.
while generating the PDF from the pie chart. i am hitting the above mention exception
Comment 6 Xiaoying Gu CLA 2011-04-26 21:04:34 EDT
(In reply to comment #5)
> Created attachment 194083 [details]
> sample rptdesign, which i am using. this is giving the problem
> 
> This is the rptdesign, from this i am able to generate the pie chart.
> while generating the PDF from the pie chart. i am hitting the above mention
> exception

Would you please attache the script data source code? I can not preview the report here. 
Or can you attache the report document?
Comment 7 raghunadh.madamanchi CLA 2011-04-27 12:50:56 EDT
Created attachment 194183 [details]
reportdocument
Comment 8 raghunadh.madamanchi CLA 2011-04-27 12:52:40 EDT
please find the report document as attachment
Comment 9 Gang Liu CLA 2011-04-28 03:59:52 EDT
I can not view the report with attached report document, since user-defined Java class is called in render time, these classes are not available. 

Could you please create a report with sampleDB to reproduce this bug, or attach the java class.

Thanks
Comment 10 Gang Liu CLA 2011-04-29 03:51:13 EDT
From the error stack, this bug only exists in 2.5.0, and should not exist since 2.5.2.
Comment 11 Gang Liu CLA 2011-05-13 04:54:13 EDT
fixed.