Project: Birt
Bug 115270 [smoke]NPE thrown out when double click image imported from library
Reported: 2005-11-07 03:05:52 | Status: closed fixed

description: NPE thrown out when double click image imported from library steps to reproduce: 1. import a library to a report 2. drag the image in library to the report 3. double click the image actual result: NPE thrown out preview the report. there is no image avalable expected result: No exception thrown out exception stack trace: java.lang.NullPointerException at org.eclipse.birt.report.designer.internal.ui.util.graphics.ImageCanvas.loadImag e(ImageCanvas.java:343) at org.eclipse.birt.report.designer.internal.ui.dialogs.ImageBuilderDialog.preview (ImageBuilderDialog.java:498) at org.eclipse.birt.report.designer.internal.ui.dialogs.ImageBuilderDialog.initLis t(ImageBuilderDialog.java:622) at org.eclipse.birt.report.designer.internal.ui.dialogs.ImageBuilderDialog.swtichT oEmbeddedType(ImageBuilderDialog.java:472) at org.eclipse.birt.report.designer.internal.ui.dialogs.ImageBuilderDialog.switchT o(ImageBuilderDialog.java:259) at org.eclipse.birt.report.designer.internal.ui.dialogs.ImageBuilderDialog.initDia log(ImageBuilderDialog.java:561) at org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDialog.open (BaseDialog.java:137) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ImageE ditPart.performDirectEdit(ImageEditPart.java:217) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ImageE ditPart.performRequest(ImageEditPart.java:200) at org.eclipse.gef.tools.SelectEditPartTracker.performOpen (SelectEditPartTracker.java:187) at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick (SelectEditPartTracker.java:129) at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick (AbstractTool.java:944) at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick (SelectionTool.java:502) at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:204) at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked (DomainEventDispatcher.java:285) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick (LightweightSystem.java:518) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:141) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:163) 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:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)

Files changed in fix:
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ElementFactory.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/elements/table/LayoutUtil.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/DesignElement.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/TableItem.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/ReportElementState.java