Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsInvalid Thread Access on Display.readAndDispatch() (using SWT_AWT)
https://www.eclipse.org/forums/index.php/mv/msg/172724/549645/#msg_549645
Originally posted by: hillner.informatik.uni-leipzig.de
Hi all,
I got a really strange problem. I integrated an eclipse plugin into a
native java program. Therefore I started Equinox manually and installed
the required plugins, ...
The plugin which is all about contains a GUI which I put on a JPanel
using the SWT-AWT bridge.
The point is that the UI can be started once within the host program.
when I close the window which contains the SWT-UI (not the whole
program) and try to start it again, the SWT-UI cannot be loaded because
the Display is accessed incorrectly (Invalid Thread Access).
Please see the stack trace below:
My code starts a new Thread which loads equinox and starts the target
plugin. Maybe the loader thread is the problem when trying to access the
display but I can't load the platform in the same thread like the
application, in this case the UI won't come up.
The strange thing is that the Exception is thrown in the code below and
only when executing the component the second time (equinox is shut down
every time the host window was closed).