| Summary: | In DeferredTreeContentManager - ProgressMessages.get() called out of UI Context | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Imrich Schindler <imrich.schindler> | ||||||||
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P2 | CC: | mcnaggets, mleone | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 2.2 RC1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 208729 [details]
Proposed patch.
This patch uses the same technique like in other places (FilteredItemsSelectionDialog for example) in the Workbench - access messages with fake context.
Imrich, could you try the attached patch? What is the status of this bug? In RAP 2.1 it is still actual. Created attachment 237599 [details]
Proposed Patch
Relative to code as modified by patch contributed in this thread by Ivan.
Comment on attachment 237599 [details] Proposed Patch The proposed patch I submitted shows what I needed to do to make Ivan's patch work in my app. See forum thread http://www.eclipse.org/forums/index.php/mn/msg/607213/1/on/0/?SQ=ad7b2861d6d8f3391c192ae811d046e1 for further explanation. Fixed in master with commit f8a286b305cd65959c562767120fabd017255783. Mark, I didn't change the execution of "adapter.fetchDeferredChildren" as you suggested. It is still executed in background thread. |
Created attachment 207450 [details] Patch All ProgressMessages.get() calls are called out of UI Context If I call ProgressMessages.get() when object DeferredTreeContentManager is created an assign return values into local variables and in next code use this variables, all is ok. Patch is attached. Example trace log: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3533) ~[na:na] at org.eclipse.swt.SWT.error(SWT.java:3456) ~[na:na] at org.eclipse.swt.SWT.error(SWT.java:3427) ~[na:na] at org.eclipse.rwt.RWT.checkHasSessionContext(RWT.java:387) ~[na:na] at org.eclipse.rwt.RWT.getLocale(RWT.java:324) ~[na:na] at org.eclipse.rwt.RWT$NLS.getISO8859_1Encoded(RWT.java:108) ~[na:na] at org.eclipse.ui.internal.progress.ProgressMessages.get(ProgressMessages.java:138) ~[na:na] at org.eclipse.ui.progress.DeferredTreeContentManager.runClearPlaceholderJob(DeferredTreeContentManager.java:385) ~[na:na] at org.eclipse.ui.progress.DeferredTreeContentManager$2.done(DeferredTreeContentManager.java:295) ~[na:na] at org.eclipse.core.internal.jobs.JobListeners$3.notify(JobListeners.java:39) ~[na:na] at org.eclipse.core.internal.jobs.JobListeners.doNotify(JobListeners.java:112) ~[na:na] at org.eclipse.core.internal.jobs.JobListeners.done(JobListeners.java:152) ~[na:na] at org.eclipse.core.internal.jobs.JobManager.endJob(JobManager.java:647) ~[na:na] at org.eclipse.core.internal.jobs.WorkerPool.endJob(WorkerPool.java:105) ~[na:na] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:71) ~[na:na]