| Summary: | NPE in Mark Occurrences because of a null document | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Laurent <laurent.hubert> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jan, sebastian.zarnekow |
| Version: | 2.2.1 | Flags: | sebastian.zarnekow:
juno+
|
| Target Milestone: | M5 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Laurent
The stacktrace does not match the latest version from master. Any chance to reproduce the problem? I think it is a concurrency issue, so it is not easy to reproduce. Maybe I could try to reproduce it on the version from the master with some breakpoints. Is the master publicly accessible ? The udpate site with the latest successful build is available here: https://hudson.eclipse.org/hudson/job/Xtext-nightly-HEAD/lastSuccessfulBuild/artifact/xtext.p2.repository/ In the version of Xtext 2.3.0v201201121125, the line at which the error may occur is line 80. I am now trying to reproduce the bug. To reproduce the bug, 1) put a breakpoint on line 79 in DefaultOccurrenceComputer (at editor.getDocument();), 2) open an editor and have the cursor on a reference with Mark Occurrences activated to reach the breakpoint, 3) once the job is waiting at the breakpoint, close the editor, and 4) resume the job that was waiting (editor contains a null document, and this produces an NPE at the next line) Alright, that's evil: as createAnnotationMap is not called from the UI thread (deliberately, to do the calcultion in background) the editor could have disposed its document in the meantime. Pushed a NPE guard. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |