Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327436 - ArrayIndexOutOfBoundsException when rendering chart in PDF
Summary: ArrayIndexOutOfBoundsException when rendering chart in PDF
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-Chart-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 07:28 EDT by Lukasz Pobereznik CLA
Modified: 2011-05-26 13:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Pobereznik CLA 2010-10-11 07:28:42 EDT
When rendering a report in PDF that contains a chart with links (local bookmarks), following exception is being thrown:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4 at org.eclipse.birt.report.engine.layout.pdf.PDFImageLM.getArea(PDFImageLM.java:531) at org.eclipse.birt.report.engine.layout.pdf.PDFImageLM.createImageMap(PDFImageLM.java:385) at org.eclipse.birt.report.engine.layout.pdf.PDFImageLM.processChartLegend(PDFImageLM.java:372) at org.eclipse.birt.report.engine.layout.pdf.PDFImageLM.init(PDFImageLM.java:345) at org.eclipse.birt.report.engine.layout.pdf.PDFImageLM.<init>(PDFImageLM.java:126) at org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory$ContentVisitor.visitImage(PDFLayoutManagerFactory.java:154) at org.eclipse.birt.report.engine.content.impl.ImageContent.accept(ImageContent.java:63) at org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory.createLayoutManager(PDFLayoutManagerFactory.java:71) at org.eclipse.birt.report.engine.layout.pdf.PDFLineAreaLM.handleChild(PDFLineAreaLM.java:167) at org.eclipse.birt.report.engine.layout.pdf.PDFLineAreaLM.traverseChildren(PDFLineAreaLM.java:150) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:141) at org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:132) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockContainerLM.traverseSingleChild(PDFBlockContainerLM.java:44) at org.eclipse.birt.report.engine.layout.pdf.PDFImageBlockContainerLM.traverseChildren(PDFImageBlockContainerLM.java:28) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:141) at 

Workaround for that is a JavaScript code that will turn off interactivity when report is being generated in PDF:
function beforeDrawSeries(series, isr, icsc)
{
	if(getOutputFormat()=="pdf") {
		icsc.getChartInstance().getInteractivity().setEnable(false);
	}
}
Comment 1 Xiaoying Gu CLA 2010-10-11 22:26:13 EDT
Could you please provide the buildID of BIRT version that you are using?
Comment 2 Xiaoying Gu CLA 2010-10-12 03:48:19 EDT
I can not reproduce this issue in the 2.6.1 release.

Could you please try with the latest release or attach your report design for us to investigate?
Comment 3 Lukasz Pobereznik CLA 2010-10-12 04:03:07 EDT
Build symbol is r22x_v20080226.
We are using BIRT version 2.2.2 and migration to 2.6.1 is not an option at this time.
Comment 4 Xiaoying Gu CLA 2010-11-01 22:58:57 EDT
Please try to upgrade to 2.6.1 version. 2.2.x stream is no longer under maintenance.