Warning: Can't synchronize with repository "(default)" (/local/svn/repos/sde does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #16 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Invalid thread access (org.eclipse.swt.SWTException)

Reported by: sct Owned by: mayer
Priority: major Milestone: IntegrationVersionM30
Component: SDE GUI Version: 3.0
Keywords: Cc:

Description

The Sensoria Eclipse UI seems to have a problem if a tool invocation/script causes some change in an active part in the Eclipse workbench. In that case, an SWTException is thrown (Illegal thread access), the reason for which I suspect is that the script execution is done in a separate thread from which it is not allowed to access (and refresh) SWT objects.

A small example to demonstrate this effect:

sCore.postToBoard("Hi, I'm a bug.");

Put this into an arbitrary .sscript file and run it by using right click -> Run as -> Sensoria script with the Sensoria Blackboard View open. Since it causes an Eclipse UI update, the above mentioned exception is thrown (although the script is actually executed).

I believe that this is a serious issue since it effectively disables already Eclipse-based tools from functioning properly (e.g. VIATRA2 has a number of Eclipse views which are not allowed to be open while VIATRA2 is called from the Case tool because of this issue) as well as causing problems with the Case tool's own UI components.

Sincerely, Istvan Rath

End note: I am using Eclipse 3.3.0 build I20070625-1500 on Linux/GTK.

Change History

comment:1 Changed 10 years ago by mayer

  • Status changed from new to assigned

Hi,

we have discussed this before via email. The execution is indeed done on a separate thread, as it is a long-running operation which should not freeze up the UI.

As a remedy you need to wrap your UI-updating code in Display.syncExec() or Display.asyncExec() blocks.

With regard to the shell, I will use Display.XXX methods in the score object in order to allow using them in scripts.

Does this solve your issue? If not, please mail me.

-philip

comment:2 Changed 10 years ago by sensoria

  • Priority changed from critical to major

As discussed via E-Mail, the Shell functions will be wrapped and additional documentation provided for solving this issue.

comment:3 Changed 9 years ago by anonymous

fixed in cvs

comment:4 Changed 9 years ago by mayer

  • Status changed from assigned to closed
  • Resolution set to fixed

svn. :)

Note: See TracTickets for help on using tickets.