Project: Birt
Bug 265782 NPE occurs when inserting label into Crosstab header
Reported: 2009-02-22 21:12:45 | Status: closed fixed

Description: NPE occurs when inserting label into Crosstab header Build number: 2.5.0.v20090223-0630 Steps to reproduce: 1, New a Crosstab 2, New a label 3, Drag the label into Crosstab header Expected result: No NPE occurs when inserting label into crosstab header Actual result: NPE occurred in step3 Error log: java.lang.NullPointerException at org.eclipse.gef.editparts.AbstractEditPart.getRoot(AbstractEditPart.java:551) at org.eclipse.gef.editparts.AbstractEditPart.getViewer(AbstractEditPart.java:601) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.ReportElementDragTracker$DelaySelectionHelper.run(ReportElementDragTracker.java:132) at org.eclipse.swt.widgets.Display.runTimer(Display.java:3938) at org.eclipse.swt.widgets.Display.messageProc(Display.java:3132) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2393) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3468) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1270)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/tools/ReportElementDragTracker.java