Project: Birt
Bug 217552 Exception throws out when show chart view of grandtotal.
Reported: 2008-02-02 05:42:32 | Status: closed fixed

description: Exception throws out when show chart view of grandtotal. build version: 2.3.0 v20080202-0800 steps to reproduce: 1. New a crosstab.Define row area, column area and detail area. 2. Select column area to show grandtotal as chart view. Expected result: No error and grandtotal is shown as chart view. Actual result: Error dialog pops up, saying an unexpected internal exception occurs. 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) at org.eclipse.birt.report.item.crosstab.internal.ui.editors.action.AbstractCrosstabAction.transEnd(AbstractCrosstabAction.java:57) at org.eclipse.birt.report.item.crosstab.internal.ui.editors.action.AddSubTotalAction.run(AddSubTotalAction.java:148) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3750) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2381) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2345) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2211) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:473) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:468) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:561) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:501) at org.eclipse.equinox.launcher.Main.run(Main.java:1239) 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) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:197) at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:197) at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.refreshChildren(ReportElementEditPart.java:562) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:564) at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212) at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198) at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.refreshChildren(ReportElementEditPart.java:562) at org.eclipse.birt.report.item.crosstab.internal.ui.editors.editparts.CrosstabTableEditPart.refreshChildren(CrosstabTableEditPart.java:776) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:564) at org.eclipse.birt.report.item.crosstab.internal.ui.editors.editparts.CrosstabTableEditPart.refresh(CrosstabTableEditPart.java:826) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.contentChange(ReportElementEditPart.java:931) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AbstractTableEditPart.contentChange(AbstractTableEditPart.java:151) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AbstractReportEditPart.contentChange(AbstractReportEditPart.java:222) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AbstractReportEditPart$1.runModelChange(AbstractReportEditPart.java:71) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AbstractReportEditPart$EditpartReportEventRunnable.run(AbstractReportEditPart.java:241) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AbstractModelEventProcessor.postElementEvent(AbstractModelEventProcessor.java:95) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.GraphicsViewModelEventProcessor.postElementEvent(GraphicsViewModelEventProcessor.java:210) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postModelEvent(ModelEventManager.java:127) ... 35 more

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