Project: Birt
Bug 153732 NPE when merge cells with one cell containing a container item
Reported: 2006-08-14 04:02:03 | Status: closed fixed

Description: NPE when merge cells with one cell containing a container item Steps to reproduce: 1. Insert a grid. 2. Insert a grid to the second cell of the first grid's first row. 3. Select first cell and second cell, right click and select Merge Cells Expected result: Cells are merged without exception. Actual result: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:3374) at org.eclipse.swt.SWT.error(SWT.java:3297) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) 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:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Caused by: java.lang.NullPointerException at org.eclipse.birt.report.designer.core.model.DesignElementHandleAdapter.getDefaultSize(DesignElementHandleAdapter.java:149) at org.eclipse.birt.report.designer.core.model.schematic.TableHandleAdapter.getDefaultWidth(TableHandleAdapter.java:700) at org.eclipse.birt.report.designer.core.model.schematic.ColumnHandleAdapter.getWidth(ColumnHandleAdapter.java:100) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.init(TableLayout.java:983) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.layout(TableLayout.java:146) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.layout(TableLayout.java:98) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.calculateMinimumSize(TableLayout.java:1093) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.getMinimumSize(TableLayout.java:1159) at org.eclipse.draw2d.Figure.getMinimumSize(Figure.java:707) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.figures.TableFigure.getMinimumSize(TableFigure.java:128) at org.eclipse.birt.report.designer.internal.ui.layout.ReportFlowLayout.calculateMinimumSize(ReportFlowLayout.java:735) at org.eclipse.draw2d.AbstractHintLayout.getMinimumSize(AbstractHintLayout.java:68) at org.eclipse.draw2d.Figure.getMinimumSize(Figure.java:707) at org.eclipse.draw2d.Figure.getMinimumSize(Figure.java:697) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.initMinSize(TableLayout.java:668) at org.eclipse.birt.report.designer.internal.ui.layout.TableLayout.layout(TableLayout.java:152) at org.eclipse.draw2d.Figure.layout(Figure.java:1029) at org.eclipse.draw2d.Figure.validate(Figure.java:1735) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Viewport.validate(Viewport.java:363) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.Figure.validate(Figure.java:1737) at org.eclipse.draw2d.FreeformViewport$FreeformViewportLayout.calculatePreferredSize(FreeformViewport.java:28) at org.eclipse.draw2d.AbstractLayout.getPreferredSize(AbstractLayout.java:93) at org.eclipse.draw2d.AbstractHintLayout.getPreferredSize(AbstractHintLayout.java:85) at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:735) at org.eclipse.draw2d.ScrollPaneSolver.solve(ScrollPaneSolver.java:75) at org.eclipse.draw2d.FigureCanvas.layoutViewport(FigureCanvas.java:238) at org.eclipse.draw2d.FigureCanvas.access$4(FigureCanvas.java:236) at org.eclipse.draw2d.FigureCanvas$3.notifyValidating(FigureCanvas.java:201) at org.eclipse.draw2d.UpdateManager.fireValidating(UpdateManager.java:123) at org.eclipse.draw2d.DeferredUpdateManager.performValidation(DeferredUpdateManager.java:188) at org.eclipse.draw2d.DeferredUpdateManager.performUpdate(DeferredUpdateManager.java:165) at org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(DeferredUpdateManager.java:46) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) ... 20 more

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