Bug 63550 - NPE "Java AST Creation"
Summary: NPE "Java AST Creation"
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-22 15:32 EDT by Dan Kehn CLA
Modified: 2004-05-28 15:41 EDT (History)
0 users

See Also:


Attachments
Error / Configuration log (91.46 KB, text/plain)
2004-05-22 15:32 EDT, Dan Kehn CLA
no flags Details
Error message (68.34 KB, image/jpeg)
2004-05-22 15:33 EDT, Dan Kehn CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kehn CLA 2004-05-22 15:32:08 EDT
M9 build.  Occurred while editing from background task.  See attached error 
log and screeshot.
Comment 1 Dan Kehn CLA 2004-05-22 15:32:58 EDT
Created attachment 10985 [details]
Error / Configuration log
Comment 2 Dan Kehn CLA 2004-05-22 15:33:40 EDT
Created attachment 10986 [details]
Error message 

This was shown several times in succession.
Comment 3 Dan Kehn CLA 2004-05-22 15:36:51 EDT
I regret that I do not have precise recreation steps.  I had very recently 
selected "Source > Sort Members" when this happened.  The "Mark Occurrences" 
options are all checked and it may be related (it displayed a warning message 
saying all of these marks would be lost).
Comment 4 Olivier Thomann CLA 2004-05-25 18:13:49 EDT
I propose to replace all the try/catch AbortCompilation with try/catch
RuntimeException inside the DefaultBindingResolver. I believe this is another
case of errors when the compilation unit has been reset.
Could you please attach your test case? I'd like to be able to reproduce the
problem and be sure that the suggested fix is right.
Comment 5 Dan Kehn CLA 2004-05-25 18:25:32 EDT
As I said in comment #3, I regret that I don't have a testcase and I can't 
reproduce it on demand.  Normally I wouldn't bother reporting it, but since 
the 3.0 ship date approaches, I have reported spurious errors even if I can't 
reproduce them as long as there's a decent log.
Comment 6 Olivier Thomann CLA 2004-05-25 19:03:37 EDT
You were perfectly right. It is always good to report problems. If you get a
test case, don't hesitate to attach it.
Thanks for the report. I will try to investigate.
Comment 7 Olivier Thomann CLA 2004-05-28 10:29:47 EDT
I will add a try/catch RuntimeException where I had a try/catch AbortCompilation
in order to catch cases where the scopes are not available anymore.
Comment 8 Olivier Thomann CLA 2004-05-28 11:06:19 EDT
Fixed by catching RuntimeException. This seems to be a case where no scopes are
available anymore. If we change our strategy of removing scopes at the end of
the DOM/AST creation I will revisit this one.
Fixed and released in HEAD.
Comment 9 Olivier Thomann CLA 2004-05-28 15:41:42 EDT
Could not reproduce. No test case available, but the try/catch should handle
that case now.
Verified in 200405281200. Please reopen if you see it with a newer build.