Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Exception when unlocking windows' screensaver
Exception when unlocking windows' screensaver [message #662164] Tue, 29 March 2011 14:41 Go to next message
Marco Maccaferri is currently offline Marco MaccaferriFriend
Messages: 147
Registered: July 2009
Senior Member
Hi.

One of our users sometimes gets a Graphic is disposed exception when he
unlocks the screensaver while our RCP application is running. To be
clear, the user leaves the PC on with our application running at night,
the screensaver starts and when he returns back the next day and unlocks
the screensaver the error pops out. The application then shows some
other weird behaviour but I think it is all related to that graphic
disposed error.

This is the stack trace:

org.eclipse.swt.SWTException: Graphic is disposed
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.SWT.error(SWT.java:3770)
at org.eclipse.swt.graphics.Image.getBounds(Image.java:1154)
at org.eclipse.swt.custom.CTabItem.drawSelected(CTabItem.java:3 77)
at org.eclipse.swt.custom.CTabItem.onPaint(CTabItem.java:807)
at org.eclipse.swt.custom.CTabFolder.drawTabArea(CTabFolder.jav a:1147)
at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:23 06)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.j ava:328)
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:14 25)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4001 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:24 10)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3471)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.rtrms.amoeba.internal.Application.run(Application.java:2 5)
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.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
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(EclipseS tarter.java:368)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

The exception is caused by a WM_PAINT event, I guess this is a general
redraw caused by the screensaver. I can't figure out if it is caused by
something the application is doing or if it is a framework bug. The
application does some background tasks over night involving also closing
and reopening views automatically but it doesn't dispose anything on its
own.

Has anyone encountered something similar ?

Regards,
Marco.
Re: Exception when unlocking windows' screensaver [message #662185 is a reply to message #662164] Tue, 29 March 2011 16:01 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 29/03/11 8:11 PM, Marco Maccaferri wrote:
> Hi.
>
> One of our users sometimes gets a Graphic is disposed exception when he
> unlocks the screensaver while our RCP application is running. To be
> clear, the user leaves the PC on with our application running at night,
> the screensaver starts and when he returns back the next day and unlocks
> the screensaver the error pops out. The application then shows some
> other weird behaviour but I think it is all related to that graphic
> disposed error.
>
> This is the stack trace:
>
> org.eclipse.swt.SWTException: Graphic is disposed
> at org.eclipse.swt.SWT.error(SWT.java:3884)
> at org.eclipse.swt.SWT.error(SWT.java:3799)
> at org.eclipse.swt.SWT.error(SWT.java:3770)
> at org.eclipse.swt.graphics.Image.getBounds(Image.java:1154)
> at org.eclipse.swt.custom.CTabItem.drawSelected(CTabItem.java:3 77)
> at org.eclipse.swt.custom.CTabItem.onPaint(CTabItem.java:807)
> at org.eclipse.swt.custom.CTabFolder.drawTabArea(CTabFolder.jav a:1147)
> at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:23 06)
> at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.j ava:328)
> 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:14 25)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:4001 )
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:24 10)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3471)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at com.rtrms.amoeba.internal.Application.run(Application.java:2 5)
> 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.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>
> 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(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>
> The exception is caused by a WM_PAINT event, I guess this is a general
> redraw caused by the screensaver. I can't figure out if it is caused by
> something the application is doing or if it is a framework bug. The
> application does some background tasks over night involving also closing
> and reopening views automatically but it doesn't dispose anything on its
> own.
>
> Has anyone encountered something similar ?
>
> Regards,
> Marco.

This belongs to swt forum. CC-ing...

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Previous Topic:Dynamic menu pagination
Next Topic:How to restore a minimised view?
Goto Forum:
  


Current Time: Thu Apr 25 17:04:44 GMT 2024

Powered by FUDForum. Page generated in 0.02801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top