| Summary: | [xtext][ui] Assertion failed in spell checker | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jan | ||||
| Version: | 2.3.0 | Flags: | sebastian.zarnekow:
juno+
|
||||
| Target Milestone: | M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Sebastian Zarnekow
Created attachment 210847 [details]
Cope with outdated cached positions
Would be nice to have an example to reproduce this.
I assume it's a race condition, as we cache the partition positions which are calculated in
DocumentPartitioner.documentChanged2(DocumentEvent)
called from the UI thread and calculate the partitions from this data in
DocumentPartitioner.computePartitioning(int, int, boolean)
called from the reconciler (non-UI thread). If the document is changed concurrently, the document's length no longer matches the partitions.
The code is more or less copied from existing JFace classes, so the race condition should also occur in other editors. Our caching just raises the likelyhood.
As the concurrent document change is going to trigger another reconciler run, I guess it's safe to just ignore this condition and let the second run fix the broken partitions. The attached patch implements this. We could also try to synchronize the fCachedPositions between the two threads alternatively, but I'd rather not raise the complexity here.
Opinions?
Applied patch and pushed to MASTER. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |