Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Possible bug in the SWT_AWT bridge?
Possible bug in the SWT_AWT bridge? [message #437285] Wed, 02 June 2004 14:18 Go to next message
Eclipse UserFriend
Originally posted by: cwilkenloh.ezgov.com

Hi,
Below is a very simple code snippet that reproduces a problem that I'm
seeing in an editor that uses SWT_AWT.new_Frame() to embed an
existing swing application.


public void createPartControl(Composite parent)
{
Composite panel = new Composite(parent, SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(panel);

/*
* Other code here that is not needed to reproduce the problem
* ...
*/
}


After the editor is disposed of, if I maximize or minimize the workbench
shell, the exception below is generated and the workbench becomes
unusable. I'm seeing the problem with the latest stable build (RC1) on
Win32.

Is this a bug, or do I need to do some extra disposal work in my editor?



org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:2691)
at org.eclipse.swt.SWT.error(SWT.java:2616)
at org.eclipse.swt.SWT.error(SWT.java:2587)
at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:469)
at org.eclipse.swt.awt.SWT_AWT$5.handleEvent(SWT_AWT.java:173)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
at org.eclipse.swt.widgets.Control.WM_MOVE(Control.java:3954)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2995 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:14 59)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2380)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:334)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:638)
at org.eclipse.core.launcher.Main.main(Main.java:622)
Re: Possible bug in the SWT_AWT bridge? [message #437371 is a reply to message #437285] Thu, 03 June 2004 13:00 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Enter a problem report. It looks like a bug in the SWT_AWT. It's important
and needs to be fixed for 3.0.

"Chris Wilkenloh" <cwilkenloh@ezgov.com> wrote in message
news:c9kn5g$1l4$1@eclipse.org...
> Hi,
> Below is a very simple code snippet that reproduces a problem that I'm
> seeing in an editor that uses SWT_AWT.new_Frame() to embed an
> existing swing application.
>
>
> public void createPartControl(Composite parent)
> {
> Composite panel = new Composite(parent, SWT.EMBEDDED);
> Frame frame = SWT_AWT.new_Frame(panel);
>
> /*
> * Other code here that is not needed to reproduce the problem
> * ...
> */
> }
>
>
> After the editor is disposed of, if I maximize or minimize the workbench
> shell, the exception below is generated and the workbench becomes
> unusable. I'm seeing the problem with the latest stable build (RC1) on
> Win32.
>
> Is this a bug, or do I need to do some extra disposal work in my editor?
>
>
>
> org.eclipse.swt.SWTException: Widget is disposed
> at org.eclipse.swt.SWT.error(SWT.java:2691)
> at org.eclipse.swt.SWT.error(SWT.java:2616)
> at org.eclipse.swt.SWT.error(SWT.java:2587)
> at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
> at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:469)
> at org.eclipse.swt.awt.SWT_AWT$5.handleEvent(SWT_AWT.java:173)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
> at org.eclipse.swt.widgets.Control.WM_MOVE(Control.java:3954)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:2995 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:14 59)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2380)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:334)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:128)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
>
Re: Possible bug in the SWT_AWT bridge? [message #437389 is a reply to message #437285] Thu, 03 June 2004 15:03 Go to previous message
Silenio Quarti is currently offline Silenio QuartiFriend
Messages: 31
Registered: July 2009
Member
This is fixed in HEAD.


Chris Wilkenloh wrote:

> Hi,
> Below is a very simple code snippet that reproduces a problem that I'm
> seeing in an editor that uses SWT_AWT.new_Frame() to embed an
> existing swing application.


> public void createPartControl(Composite parent)
> {
> Composite panel = new Composite(parent, SWT.EMBEDDED);
> Frame frame = SWT_AWT.new_Frame(panel);

> /*
> * Other code here that is not needed to reproduce the problem
> * ...
> */
> }


> After the editor is disposed of, if I maximize or minimize the workbench
> shell, the exception below is generated and the workbench becomes
> unusable. I'm seeing the problem with the latest stable build (RC1) on
> Win32.

> Is this a bug, or do I need to do some extra disposal work in my editor?



> org.eclipse.swt.SWTException: Widget is disposed
> at org.eclipse.swt.SWT.error(SWT.java:2691)
> at org.eclipse.swt.SWT.error(SWT.java:2616)
> at org.eclipse.swt.SWT.error(SWT.java:2587)
> at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
> at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:469)
> at org.eclipse.swt.awt.SWT_AWT$5.handleEvent(SWT_AWT.java:173)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
> at org.eclipse.swt.widgets.Control.WM_MOVE(Control.java:3954)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:2995 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1454 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:398)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3031 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1430)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:14 59)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2380)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:334)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:128)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
Previous Topic:OS X , dual CPU and Kernel Panics
Next Topic:Image Transparency
Goto Forum:
  


Current Time: Fri Apr 26 09:00:33 GMT 2024

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

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

Back to the top