Project: Birt
Bug 306088 Generating a report with the excel emitter for a report with an image whose width is set to 100% causes exceptions
Reported: 2010-03-16 17:19:39 | Status: verified fixed

Build Identifier: CVS head (Helios) SEVERE: An error happened while running the report. Cause: Throwable occurred: java.lang.IndexOutOfBoundsException at java.util.ArrayList.get(Unknown Source) at org.eclipse.birt.report.engine.emitter.excel.DataCache.addData(DataCache.java:72) at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.addDatatoCache(ExcelLayoutEngine.java:1040) at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.addEmptyData(ExcelLayoutEngine.java:899) at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.addData(ExcelLayoutEngine.java:871) at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.addImageData(ExcelLayoutEngine.java:696) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.startImage(ExcelEmitter.java:441) 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.buffer.DummyPageBuffer.startContent(DummyPageBuffer.java:125) 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.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.RunAndRenderTask.doRun(RunAndRenderTask.java:170) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:75) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:920) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973) at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90) at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(EngineFragment.java:318) at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(AbstractBaseFragment.java:76) at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(BirtEngineServlet.java:120) at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(BaseReportEngineServlet.java:185) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.birt.report.servlet.BaseReportEngineServlet.service(BaseReportEngineServlet.java:116) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:318) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:380) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:540) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Reproducible: Always Steps to Reproduce: 1. Create a new report 2. Add an image to the report 3. Use the properties view to set the image width to 100% 4. View the report in excel

Files changed in fix:
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ImageData.java