Project: Birt
Bug 130088 [Regression]NPE when open report with syntax error.
Reported: 2006-03-02 03:58:07 | Status: closed fixed

Description: NPE when open report with syntax error. Steps to reproduce: 1.In report, under MasterPage, add:<Style name="wrongName"/> as attached report 2.Open it. Expected result: See syntax error. Actual result: java.lang.NullPointerException at org.eclipse.birt.report.designer.core.model.DesignElementHandleAdapter.getModuleHandle(DesignElementHandleAdapter.java:105) at org.eclipse.birt.report.designer.core.model.SessionHandleAdapter.getReportDesignHandle(SessionHandleAdapter.java:225) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.actions.EditBindingAction.calculateEnabled(EditBindingAction.java:51) at org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:119) at org.eclipse.gef.ui.actions.SelectionAction.handleSelectionChanged(SelectionAction.java:85) at org.eclipse.gef.ui.actions.SelectionAction.setSelection(SelectionAction.java:96) at org.eclipse.gef.ui.actions.SelectionAction.update(SelectionAction.java:117) at org.eclipse.birt.report.designer.internal.ui.editors.parts.GraphicalEditorWithFlyoutPalette.updateActions(GraphicalEditorWithFlyoutPalette.java:721) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.layout.ReportLayoutEditor.selectionChanged(ReportLayoutEditor.java:97) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) at org.eclipse.ui.part.MultiPageSelectionProvider$1.run(MultiPageSelectionProvider.java:101) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.part.MultiPageSelectionProvider.fireEventChange(MultiPageSelectionProvider.java:99) at org.eclipse.ui.part.MultiPageSelectionProvider.fireSelectionChanged(MultiPageSelectionProvider.java:82) at org.eclipse.birt.report.designer.internal.ui.editors.parts.ReportMultiPageEditorSite.handleSelectionChanged(ReportMultiPageEditorSite.java:335) at org.eclipse.birt.report.designer.internal.ui.editors.parts.ReportMultiPageEditorSite$1.selectionChanged(ReportMultiPageEditorSite.java:271) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2275) at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2258) at org.eclipse.jface.text.TextViewer$3.widgetSelected(TextViewer.java:1484) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) at org.eclipse.swt.custom.StyledText.sendSelectionEvent(StyledText.java:6519) at org.eclipse.swt.custom.StyledText.doSelection(StyledText.java:2761) at org.eclipse.swt.custom.StyledText.doMouseSelection(StyledText.java:2388) at org.eclipse.swt.custom.StyledText.doMouseLocationChange(StyledText.java:2372) at org.eclipse.swt.custom.StyledText.handleMouseMove(StyledText.java:5157) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4809) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:99) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui.editors/src/org/eclipse/birt/report/designer/ui/editors/MultiPageReportEditor.java UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/parts/GraphicalEditorWithFlyoutPalette.java