Project: Birt
Bug 217401 NPE when switch column grand total to chart view[1302]
Reported: 2008-02-01 03:23:29 | Status: closed fixed

Description: NPE when switch grand total to chart view Build number:2.3.0.v20080201 Steps to reproduce: 1. New a xtab with one level in column/row area and measure content. 2. Add grand total for column area, set to Show as Chart, click OK. Expected result: NO Exception and insert a chart in grand total area. Actual result: NPE. Error log: org.eclipse.birt.report.designer.core.runtime.GUIException: Caused by java.lang.NullPointerException. at org.eclipse.birt.report.designer.core.runtime.GUIException.createGUIException(GUIException.java:78) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:169) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:150) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:89) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postModelEvent(ModelEventManager.java:132) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postEvent(ModelEventManager.java:101) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.access$0(ModelEventManager.java:93) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager$1.stackChanged(ModelEventManager.java:61) at org.eclipse.birt.report.model.activity.ActivityStack.sendNotifcations(ActivityStack.java:915) at org.eclipse.birt.report.model.activity.ActivityStack.commit(ActivityStack.java:743) Caused by: java.lang.NullPointerException at org.eclipse.emf.ecore.util.EcoreUtil$Copier.createCopy(EcoreUtil.java:512) at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:462) at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:359) at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.updateChartModelAndSize(DesignerRepresentation.java:148) at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.<init>(DesignerRepresentation.java:124) at org.eclipse.birt.chart.reportitem.ui.ChartReportItemUIImpl.createFigure(ChartReportItemUIImpl.java:69) at org.eclipse.birt.report.designer.internal.ui.extension.ExtendedUIAdapter.createFigure(ExtendedUIAdapter.java:67) at org.eclipse.birt.report.designer.internal.ui.extension.ExtendedEditPart.createFigure(ExtendedEditPart.java:131) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:445)

Files changed in fix:
chart/org.eclipse.birt.chart.reportitem.ui/src/org/eclipse/birt/chart/reportitem/ui/views/provider/ChartAggregationCellViewProvider.java chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/BIRTChartXtabResultSetEvaluator.java