Summary: | [1.5][compiler] Requesting Java AST from selection has encountered a problem | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jonathan Camilleri <camilleri.jon> | ||||||||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | daniel_megert, markus.kell.r, Olivier_Thomann, srikanth_sankaran | ||||||||||
Version: | 3.4.2 | Keywords: | needinfo | ||||||||||
Target Milestone: | 3.6 M1 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows Vista | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Please attach the .log (or the relevant entry copied from the Error Log view). I have attached the screenshot of the error, and, said what I was doing. That's all I know. As you can imagine, the screenshot does not help much if we cannot reproduce the problem and have no additional info on the circumstances. That's why I asked you to attach your log file. The log file is at <workspace location>/.metadata/.log If you don't want to attach the whole log, you can also select Window > Show View > Error Log and then copy the entry with the same title as given in the screendump (including the stack trace, of course). Created attachment 139194 [details]
log file
Attached log file.
Created attachment 139196 [details]
Another log file
There are two JDT related entries in the .log: >java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumDeclaration cannot be >cast to org.eclipse.jdt.core.dom.TypeDeclaration This is fixed, see bug 239887. !ENTRY org.eclipse.core.jobs 4 2 2009-06-12 21:40:12.984 !MESSAGE An internal error occurred during: "Requesting Java AST from selection". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.WildcardBinding.erasure(WildcardBinding.java:389) Jonathan, it would be good to have a test case. Moving to JDT Core for investigation. Could you please provide the compilation unit that caused the problem? Thanks. I don't remember sorry. Kent, it looks like typeVariable() can return null, but this is not handled everywhere. Created attachment 140015 [details]
Proposed patch
No reproduceable case to verify - just check code Released in HEAD for 3.6M1 Without a reproducable test case and/or steps to reproduce to assess how serious this problem is, this won't be backported to 3.5.1. Verfied for 3.6M1 (by code inspection) |
Created attachment 139065 [details] Screendump Build ID: Build id: I20090430-2300 Steps To Reproduce: I was (happily) typing some code when an error appeared...see attachment. More information: Microsoft Windows [Version 6.0.6001] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\Administrator>java -version java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)