Project: Birt
Bug 244668 Exceptions keep throwing out after setting the background image of label.
Reported: 2008-08-20 05:33:54 | Status: closed fixed

description: Exception keeps throwing out after setting the background image of label. build id: 2.3.1 v20080820-0630 steps to reproduce: 1. New a project. 2. New a report. 3. Add an image to the project. 4. Add a label to the report. In advanced tab of properties editor, input the image name as the background image. 5. In insert another label. Also set the image name as the background image. Actual result: Exceptions keep throwing out in error log view. Error log: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: Argument not valid) at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) 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:193) 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:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) Caused by: java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:3761) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.graphics.GC.drawImage(GC.java:852) at org.eclipse.draw2d.SWTGraphics.drawImage(SWTGraphics.java:368) at org.eclipse.draw2d.Graphics.drawImage(Graphics.java:148) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.figures.ReportElementFigure.paintFigure(ReportElementFigure.java:198) at org.eclipse.draw2d.Figure.paint(Figure.java:1049) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.figures.ReportRootFigure.paintChildren(ReportRootFigure.java:105) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1123) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1119) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1119) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1119) at org.eclipse.draw2d.ScalableFreeformLayeredPane.paintClientArea(ScalableFreeformLayeredPane.java:61) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1119) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1114) at org.eclipse.draw2d.Viewport.paintClientArea(Viewport.java:156) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1087) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1119) at org.eclipse.draw2d.Figure.paint(Figure.java:1051) at org.eclipse.draw2d.DeferredUpdateManager.paint(DeferredUpdateManager.java:155) at org.eclipse.draw2d.LightweightSystem.paint(LightweightSystem.java:199) at org.eclipse.draw2d.LightweightSystem$2.handleEvent(LightweightSystem.java:107) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1424) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3842) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541) at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method) at org.eclipse.swt.widgets.Control.update(Control.java:3651) at org.eclipse.swt.widgets.Control.update(Control.java:3641) at org.eclipse.draw2d.NativeGraphicsSource.getGraphics(NativeGraphicsSource.java:43) at org.eclipse.draw2d.DeferredUpdateManager.getGraphics(DeferredUpdateManager.java:138) at org.eclipse.draw2d.DeferredUpdateManager.repairDamage(DeferredUpdateManager.java:292) at org.eclipse.draw2d.DeferredUpdateManager.performUpdate(DeferredUpdateManager.java:181) at org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(DeferredUpdateManager.java:48) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) ... 22 more

Files changed in fix:
UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/ImageManager.java