Invalid thread access with SWT builder 2 and M9

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Invalid thread access with SWT builder 2 and M9

Postby allawy » Wed May 26, 2004 1:22 pm

Hi;

I was so Happy with the new release of SWT Builder V2 and the Eclipse 3.0 M9 together, so I downloaded them both...

I installed them without a problem and started to work on some projects I did with the M8 (and beta 2) with no problems (actually some previous bugs were gone).

when I tried to create new ViewPart/JFace TitleDialog/JFace Dialog they all faild to complete!!! with the following exception...

Code: Select all
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:750)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:115)
at com.swtdesigner.wizards.NewDesignContainerWizard.performFinish(SourceFile:34)
at com.swtdesigner.wizards.swt.NewJFaceTitleAreaDialogWizard.performFinish(SourceFile:24)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:607)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:305)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:505)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
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.Display.runDeferredEvents(Display.java:2716)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2382)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
at org.eclipse.jface.window.Window.open(Window.java:648)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:161)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:899)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:850)
at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:769)
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.Display.runDeferredEvents(Display.java:2716)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2382)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1363)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:253)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:97)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:307)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:256)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
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.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)
Caused by: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2689)
at org.eclipse.swt.SWT.error(SWT.java:2614)
at org.eclipse.swt.SWT.error(SWT.java:2585)
at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:284)
at org.eclipse.swt.widgets.Control.setEnabled(Control.java:2009)
at org.eclipse.jface.wizard.WizardDialog.updateButtons(WizardDialog.java:1011)
at org.eclipse.jface.wizard.WizardPage.setPageComplete(WizardPage.java:274)
at org.eclipse.jdt.ui.wizards.NewElementWizardPage.updateStatus(NewElementWizardPage.java:68)
at org.eclipse.jdt.ui.wizards.NewElementWizardPage.updateStatus(NewElementWizardPage.java:82)
at com.swtdesigner.wizards.NewDesignContainerPage.doStatusUpdate(SourceFile:32)
at com.swtdesigner.wizards.NewDesignContainerPage.handleFieldChanged(SourceFile:57)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.typePageDialogFieldChanged(NewTypeWizardPage.java:647)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.access$2(NewTypeWizardPage.java:599)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage$TypeFieldsAdapter.dialogFieldChanged(NewTypeWizardPage.java:563)
at org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField.dialogFieldChanged(DialogField.java:70)
at org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField.setText(StringDialogField.java:162)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setSuperClass(NewTypeWizardPage.java:871)
at com.swtdesigner.wizards.swt.NewJFaceTitleAreaDialogWizard.finishPage(SourceFile:19)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:108)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:34)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:700)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1672)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3240)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:65)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
Root exception:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2689)
at org.eclipse.swt.SWT.error(SWT.java:2614)
at org.eclipse.swt.SWT.error(SWT.java:2585)
at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:284)
at org.eclipse.swt.widgets.Control.setEnabled(Control.java:2009)
at org.eclipse.jface.wizard.WizardDialog.updateButtons(WizardDialog.java:1011)
at org.eclipse.jface.wizard.WizardPage.setPageComplete(WizardPage.java:274)
at org.eclipse.jdt.ui.wizards.NewElementWizardPage.updateStatus(NewElementWizardPage.java:68)
at org.eclipse.jdt.ui.wizards.NewElementWizardPage.updateStatus(NewElementWizardPage.java:82)
at com.swtdesigner.wizards.NewDesignContainerPage.doStatusUpdate(SourceFile:32)
at com.swtdesigner.wizards.NewDesignContainerPage.handleFieldChanged(SourceFile:57)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.typePageDialogFieldChanged(NewTypeWizardPage.java:647)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.access$2(NewTypeWizardPage.java:599)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage$TypeFieldsAdapter.dialogFieldChanged(NewTypeWizardPage.java:563)
at org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField.dialogFieldChanged(DialogField.java:70)
at org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField.setText(StringDialogField.java:162)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setSuperClass(NewTypeWizardPage.java:871)
at com.swtdesigner.wizards.swt.NewJFaceTitleAreaDialogWizard.finishPage(SourceFile:19)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:108)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:34)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:700)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1672)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3240)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:65)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)


Code: Select all
eclipse.buildId=I200405211200
java.version=1.4.2_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ar_JO


I pry to God that something wrong with my setup and I can fix simply, otherwise I will have to remove M9 and reInstall M8 again :cry:

I would apreciate if I can get a reply ASAP

One last note is that I downloaded SWT Builder V2 for M9.
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby allawy » Wed May 26, 2004 1:37 pm

I couldn't wait so I reInstalled M8, with the new builder V2 for M8 and reImported my project in it, and it works fine. The problem is that M9 solves allot of problems I had before, and I really want to use it.

Please Help!
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Wed May 26, 2004 2:22 pm

allawy wrote:I couldn't wait so I reInstalled M8, with the new builder V2 for M8 and reImported my project in it, and it works fine. The problem is that M9 solves allot of problems I had before, and I really want to use it.

Based on our recorded activation data, it appears that you either installed the Eclipse 3.0 M8 version of Designer into M9 or possibly one of the last beta versions. I would suggest downloading the M9 version again.

I just tried all of those wizards under M9 ad did not have a problem. This was a problem with the last beta build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby allawy » Wed May 26, 2004 3:13 pm

Hi;

Thanks, I reInstalled M9 and redownloaded the SWTB V2 for M9, and it works fine now (except for a simple bug, not sure), but it work and this is the important now.

Thanks allot for the help
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Wed May 26, 2004 6:11 pm

allawy wrote:I reInstalled M9 and redownloaded the SWTB V2 for M9, and it works fine now (except for a simple bug, not sure), but it work and this is the important now.

A "simple bug"?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby allawy » Thu May 27, 2004 1:09 am

Well, I call it simple cause it did not stop me from creating a new View...

when I create a new SWT View/Dialog I get an exception in the eroor log, when I rePress Next again it give me the Create Class Dialog and create it.

the exception I get is:

Code: Select all
java.lang.NullPointerException
   at com.swtdesigner.wizards.NewDesignContainerPage.doStatusUpdate(SourceFile:32)
   at com.swtdesigner.wizards.NewDesignContainerPage.handleFieldChanged(SourceFile:61)
   at org.eclipse.jdt.ui.wizards.NewContainerWizardPage.containerDialogFieldChanged(NewContainerWizardPage.java:284)
   at org.eclipse.jdt.ui.wizards.NewContainerWizardPage.access$1(NewContainerWizardPage.java:279)
   at org.eclipse.jdt.ui.wizards.NewContainerWizardPage$ContainerFieldAdapter.dialogFieldChanged(NewContainerWizardPage.java:266)
   at org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField.dialogFieldChanged(DialogField.java:70)
   at org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField.setText(StringDialogField.java:162)
   at org.eclipse.jdt.ui.wizards.NewContainerWizardPage.setPackageFragmentRoot(NewContainerWizardPage.java:411)
   at org.eclipse.jdt.ui.wizards.NewContainerWizardPage.initContainerPage(NewContainerWizardPage.java:140)
   at com.swtdesigner.wizards.NewDesignContainerPage.init(SourceFile:27)
   at com.swtdesigner.wizards.swt.NewJFaceTitleAreaDialogWizard.addPages(SourceFile:15)
   at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:105)
   at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSelectionPage.java:82)
   at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:672)
   at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:300)
   at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:505)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
   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.Display.runDeferredEvents(Display.java:2716)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2382)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
   at org.eclipse.jface.window.Window.open(Window.java:648)
   at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:161)
   at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:899)
   at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:850)
   at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:769)
   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.Display.runDeferredEvents(Display.java:2716)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2382)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1363)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:253)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
   at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:97)
   at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:307)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:256)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
   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.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)



for me I would live with it now, since it does eventually create the thing I need.

Thanks allot for the response, your support is wonderful!
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Fri May 28, 2004 5:09 am

allawy wrote:when I create a new SWT View/Dialog I get an exception in the eroor log, when I rePress Next again it give me the Create Class Dialog and create it.

You can avoid that problem by either accessing the Designer wizards from the Designer drop down button on the main Eclipse toolbar (it lists all the Designer wizards and will generally give you faster access than the Eclipse New wizards), or you can try this new build which should fix the problem under Eclipse 3.0 M9 (it was isolated to M9).
Last edited by Eric Clayberg on Fri May 28, 2004 10:56 am, edited 1 time in total.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby allawy » Fri May 28, 2004 9:25 am

Eric;

Thanks, I have downloaded the new build, but it still not working right when I user new->other, anyway, it give no problem when I use the toolbar icon as you said...

Don't know why, I can live with that though, Thanks allot again for the wonderful support...

A small note from a client who really apreciate SWT Designer, I know that there are allot of people that would love to have Swing capabilities, but SWT Designer started as SWT Designer, I bought it cause it was and still the best solution for SWT for me and I'm sure for allot other, my comment is that there are allot of other people who is actually built Swing plugins for Eclipse, but not much for SWT, I would love to see SWT Designer going faster ahead in that area, like better FormLayout support (Although I don't use it at all :) ), and Eclipse Form Design, Adding ComboViewer in M9 and extra.

As I said before Don't get me wrong I appreciate your work, and I love your support but I wish for SWT Designer to go faster and faster.
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby allawy » Fri May 28, 2004 9:27 am

Hope did not upset any Swing lover by my post above :)
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Fri May 28, 2004 10:27 am

allawy wrote:I have downloaded the new build, but it still not working right when I user new->other

What is it doing? When I try New > Other, it seems to work fine and there were no exceptions recorded to the log. Are you using Eclipse 3.0 M9 and the M9 (05-28-04) version of Designer?

allawy wrote:there are allot of other people who is actually built Swing plugins for Eclipse

Hopefully not as nice. ;-)

allawy wrote:like better FormLayout support

What would you like to see? I already think our FormLayout support is pretty nice...especially with the addition of the FormLayout layout assistant.

allawy wrote:Eclipse Form Design

Eclipse Forms support is high on our list. Keep in mind that is an Eclipse 3.0 API and it is still in beta. It won't even be finalized until 3.0 goes GA.

allawy wrote:Adding ComboViewer in M9 and extra.

"Extra" what?

I think we can get ComboViewer support in fairly soon.

In general, I thought we added some nice "big" features in v2.0.0 of SWT Designer. Our NLS support was completely overhauled and a very nice locale editor put in place. We also added a couple new SWT wizards and added support for custom SWT widgets (including the ability to add them to the palette).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby allawy » Fri May 28, 2004 12:26 pm

What is it doing? When I try New > Other, it seems to work fine and there were no exceptions recorded to the log. Are you using Eclipse 3.0 M9 and the M9 (05-28-04) version of Designer?


I wouldn't really stop here, since new builds of both Eclipse and SWTB are comming.

Hopefully not as nice.


I haven't use Swing for a while now, nor I think I will in the near future, but who knows :). I'm sure that your Swing builder is as good as you SWT one.

What would you like to see? I already think our FormLayout support is pretty nice...especially with the addition of the FormLayout layout assistant.


I only tried it for few times, I will make a list of what I don't like about it and send it sometime later :).

I think we can get ComboViewer support in fairly soon.


tonight?? :)

In general, I thought we added some nice "big" features in v2.0.0 of SWT Designer...


Yes you did, this is why I'm a happy client, but a very important thing in my openion was excluded in the final version (something that we did ask for it, and it's there for another wizard), this is an action wizard for the viewpart like the one for "JFace ApplicationWindow", I still hope for this to come soon :)
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Fri May 28, 2004 5:00 pm

allawy wrote:
I think we can get ComboViewer support in fairly soon.

tonight?? :)

As a matter of fact, yes! Here is a new 3.0 M9 build for you that includes ComboViewer support.

allawy wrote:a very important thing in my openion was excluded in the final version (something that we did ask for it, and it's there for another wizard), this is an action wizard for the viewpart like the one for "JFace ApplicationWindow", I still hope for this to come soon :)

That is still on our list. ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby allawy » Fri May 28, 2004 5:26 pm

OH MY GOD!

OK, A million Doller Please :)

If you are not the best!!!

This build is wonderful!!! it's not only gave me the ComboViewer but there is no more the new menu bug that this thread started for!!!

Eric, there are no words that can be enough to thank you guys, I greet you from deep my heart!

One more request (greedy me ;) ) did you check the book forum yet? how can I have early Access to the book there? can I purchase an ebook version? like "Manning Publications Co." does http://www.manning.com
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby allawy » Fri May 28, 2004 5:39 pm

I Just successfully tested ComboViewer in a project that I really need it in.

Couldn't just go to sleep before I Thank you again!!!
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Sat May 29, 2004 11:24 am

allawy wrote:I Just successfully tested ComboViewer in a project that I really need it in. Couldn't just go to sleep before I Thank you again!!!

I'm glad you liked it.

If you haven't done so already, make sure to vote for SWT/Swing Designer on the Eclipse Plugins Info site and the Eclipse Plugin Central site. 10's are good. ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Next

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest