Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Albireo » JOptionPane and dispose() problems
JOptionPane and dispose() problems [message #574451] Wed, 22 October 2008 02:28
Eclipse User
Originally posted by: stephan.nagy.gmail.com

Hi,

We recently switched from our much hacked on EmbeddedSwingComposite to
Alberio, and I'm happy to say many of the problems we had experienced
have gone away. However, we have encountered a new problem that we are
a bit puzzled by.

When we spawn JOptionPane from our SwingControl we get the stack at the
end of this email dispose. We hacked on the JOptionPane and replaced

dialog.show();
dialog.dispose();

with

dialog.setVisible(true);
dialog.setVisible(false);
SwingUtilities.invokeLater(new Runnable() {public void run() {
dialog.dispose();
}});

which makes the problem go away, but isn't really an acceptable
solution. Any thoughts or ideas on how we might avoid the problem?

org.eclipse.swt.SWTException: Widget is disposed

at org.eclipse.swt.SWT.error(SWT.java:3563)

at org.eclipse.swt.SWT.error(SWT.java:3481)

at org.eclipse.swt.SWT.error(SWT.java:3452)

at org.eclipse.swt.widgets.Widget.error(Widget.java:432)

at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:325)

at org.eclipse.swt.widgets.Shell.forceActive(Shell.java:806)

at org.eclipse.albireo.internal.SwtInputBlocker.open(Unknown Source)

at org.eclipse.albireo.internal.SwtInputBlocker.block(Unknown Source)

at org.eclipse.albireo.internal.AwtDialogListener$2.run(Unknown
Source)

at org.eclipse.albireo.core.ThreadingHandler$1.run(Unknown Source)

at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)

at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:129)

at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)

at org.eclipse.swing.integration.SwtInputBlocker.open(Unknown Source)

at org.eclipse.swing.integration.SwtInputBlocker.block(Unknown
Source)

at org.eclipse.swing.integration.AwtDialogListener$2.run(Unknow n
Source)

at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)

at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:129)

at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)

at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)

at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)

at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)

at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)

at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)

at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)

at com.tripos.nexus.application.NexusApplication.start(Unknown
Source)

at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)

at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)

at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)

at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)

at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)

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: 508)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)

at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Previous Topic:Slightly OT - focus problems raising a Frame as part of StackLayout
Next Topic:JOptionPane and dispose() problems
Goto Forum:
  


Current Time: Fri Oct 24 13:33:42 GMT 2014

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

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