Project: Birt
Bug 193022 [Acceptance]NPE is thrown when switch from "Format chart" to "Select data" in a multiple series bar chart[0001]
Reported: 2007-06-17 07:53:30 | Status: closed fixed

NPE is thrown when switch from "Format chart" to "Select data" in a multiple series bar chart[0001] Build number: 2.2.0.v20070614-1607 Steps to reproduce: 1.New a data source named "dSource", Set URL = jdbc:informix-sqli://spmdb:1526/spmdb:INFORMIXSERVER=ol_spmdb1. 2.New a data set named "dSet", select all fields from Table account. 3.New a bar chart ,use dset as data set, series 1:accout_id series 2:open_dt 4.Switch to "Format Chart" then switch back to "Select Data" Expected result: No NPE is thrown Actual result: NPE is thrown Error log: java.lang.NullPointerException at: org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.checkDataType(TaskSelectData.java:1254) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.checkDataForYSeries(TaskSelectData.java:1442) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.changeTask(TaskSelectData.java:1129) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.createControl(TaskSelectData.java:143) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.switchTask(WizardBase.java:815) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.switchTo(WizardBase.java:231) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.switchTo(ChartWizard.java:244) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.widgetSelected(WizardBase.java:1003) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947) org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3227) org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2005) org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:316) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) org.eclipse.jface.window.Window.runEventLoop(Window.java:820) org.eclipse.jface.window.Window.open(Window.java:796) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:102) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:198) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:183) org.eclipse.birt.report.designer.internal.ui.processor.ExtenedElementProcessor.editElement(ExtenedElementProcessor.java:64) org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performInsert(DefaultNodeProvider.java:651) org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performRequest(DefaultNodeProvider.java:360) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.eclipse.birt.report.designer.ui.views.ElementAdapterInvocationHandler.invoke(ElementAdapterInvocationHandler.java:89) $Proxy0.performRequest(Unknown Source) org.eclipse.birt.report.designer.ui.actions.BaseInsertMenuAction.insertElement(BaseInsertMenuAction.java:199) org.eclipse.birt.report.designer.ui.actions.BaseInsertMenuAction.run(BaseInsertMenuAction.java:317) org.eclipse.jface.action.Action.runWithEvent(Action.java:498) org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) org.eclipse.equinox.launcher.Main.run(Main.java:1169) Caused By:null org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.checkDataType(TaskSelectData.java:1254) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.checkDataForYSeries(TaskSelectData.java:1442) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.changeTask(TaskSelectData.java:1129) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.createControl(TaskSelectData.java:143) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.switchTask(WizardBase.java:815) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.switchTo(WizardBase.java:231) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.switchTo(ChartWizard.java:244) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.widgetSelected(WizardBase.java:1003) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947) org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3227) org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2005) org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:316) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) org.eclipse.jface.window.Window.runEventLoop(Window.java:820) org.eclipse.jface.window.Window.open(Window.java:796) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:102) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:198) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:183) org.eclipse.birt.report.designer.internal.ui.processor.ExtenedElementProcessor.editElement(ExtenedElementProcessor.java:64) org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performInsert(DefaultNodeProvider.java:651) org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performRequest(DefaultNodeProvider.java:360) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.eclipse.birt.report.designer.ui.views.ElementAdapterInvocationHandler.invoke(ElementAdapterInvocationHandler.java:89) $Proxy0.performRequest(Unknown Source) org.eclipse.birt.report.designer.ui.actions.BaseInsertMenuAction.insertElement(BaseInsertMenuAction.java:199) org.eclipse.birt.report.designer.ui.actions.BaseInsertMenuAction.run(BaseInsertMenuAction.java:317) org.eclipse.jface.action.Action.runWithEvent(Action.java:498) org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) org.eclipse.equinox.launcher.Main.run(Main.java:1169)

Files changed in fix:
chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectData.java chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectType.java