| Summary: | SyncExec in XTextEditorErrorTickUpdater causes hangs in workbench | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Samantha Chan <chanskw> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | knut.wannheden, sebastian.zarnekow | ||||
| Version: | 1.0.1 | Flags: | sebastian.zarnekow:
helios+
sebastian.zarnekow: indigo+ |
||||
| Target Milestone: | M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Samantha Chan
Hi Samantha, the syncExec is in an own job which is scheduled independently from the originating event. How does it prevent the other tasks from being finished? (In reply to comment #1) > Hi Samantha, > > the syncExec is in an own job which is scheduled independently from the > originating event. How does it prevent the other tasks from being finished? You are right... I am not able to consistently reproduce this, so I cannot see it now. But when I saw the deadlock, the UI thread was busy doing something, possibly reporting status on a user job that we spawned off. The updater is trying to get a hold of the UI thread, but could not. For some reason, because this update job cannot finish, our user job can never finish. I will dig a bit deeper to be more clear. But is there any reason why we need a sync exec here? It seems to me that we can just create a UI job and put a scheduling rule on that to update the editor title image... Why create a job that runs on syncExec? Your are right, using a UI Job would simplify the code. Could you attach a patch? (In reply to comment #3) > Your are right, using a UI Job would simplify the code. Could you attach a > patch? sure, let me try to create a patch... (In reply to comment #2) > (In reply to comment #1) > > Hi Samantha, > > > > the syncExec is in an own job which is scheduled independently from the > > originating event. How does it prevent the other tasks from being finished? > > You are right... I am not able to consistently reproduce this, so I cannot see > it now. But when I saw the deadlock, the UI thread was busy doing something, > possibly reporting status on a user job that we spawned off. The updater is > trying to get a hold of the UI thread, but could not. For some reason, because > this update job cannot finish, our user job can never finish. > > I will dig a bit deeper to be more clear. But is there any reason why we need > a sync exec here? It seems to me that we can just create a UI job and put a > scheduling rule on that to update the editor title image... Why create a job > that runs on syncExec? How about just using asyncExec instead? Created attachment 188166 [details]
Updated XTextEditorErrorTickUpdater
I think both asycnExec and UIJob will work in this case. Using a UIJob will make the code a bit simpler, as we do not need to run a job, and then schedule the actual UI update onto the UI thread.
sorry, I actually do not have the env set up to create a patch.
I have attached the updated XTextEditorErrorTickUpdater. I have simply change the updater job to an UIJob, and simplified the code.
Pushed fix to Helios Maintenance. see last comment Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |