Bug 16135

Summary: Unexpected errors while reconciling
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-05-16 08:17:07 EDT
Build 20020515

In self-hosted workspace, opened JavaProject, lots of errors got discovered 
into it due to some missing types. In particular, Openable was said to be 
missing although it was there.

After forcing a build, problems were gone.

No reproduceable steps, suspecting some concurrency issue closing a buffer 
under the resolver.
Comment 1 Philipe Mulet CLA 2002-05-20 08:19:16 EDT
Unable to find truly reproduceable steps, however usually if breaking on error 
reporting (problem is error) in self-hosting workspace and quickly opening many 
editors, the problem will usually occur at some point.

Actually, found several areas where concurrency could cause grief. Reconciling 
with errors can lead to populate the Java model concurrently, and the following 
areas are problematic in multi-threaded mode:

- JavaElement#getRawInfo isn't synchronized on JavaModelManager
- senders of JavaElement#getInfo must be protected, since element opening first
adds the info in the cache (e.g. isOpen)
- Namelookup#findType is sharing its type and package requestors amongst 
concurrent invocations
- Namelookup#workingCopies cache isn't thread safe. If computing a hierarchy 
while reconciling, reconciliation might see unwanted working copies (before 
they get initialized).
Comment 2 Philipe Mulet CLA 2002-05-20 08:19:41 EDT
Protected all the above scenarii, and cannot reproduce issue anymore.
Comment 3 Philipe Mulet CLA 2002-05-20 17:38:48 EDT
Fixed