Summary: | [1.5][compiler] internal compiler error, but works when saved twice | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Daniel Stephan <fast.jack> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 RC2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Daniel Stephan
2005-06-03 01:04:44 EDT
You should have a compilation unit with a marker that is refering to the NPE. Could you please provide the source code of this class and its dependants to help us to reproduce the problem? Thanks. (In reply to comment #1) It does show a red marker, but it puts it on the first line of the file. (The first line is inhabited by a comment only.) When I then visit the "Problems" view and check the entry there, it contains the shown exception stack trace. I'll try to extract the file into a blank project without dependencies. Gimme a minute :) The marker is on the first line because of the crash. There is no line to report the problem as this is an internal error. Thanks for attaching the test case. Created attachment 22324 [details]
A minimal project, zipped completely.
The class in question is this one: IndexedSparseMatrix
I don't get the exact same NPE in latest. It crashes in org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createRawType(...). Once this is fixed, we might ask you to verify it with your test case. Here is a simpler test case: package test; public class A { A() { new B().bar(); } } package test; import java.util.Map; import java.util.Set; import java.util.SortedSet; public class B { public Set<Map.Entry> bar() { return null; } void foo(SortedSet<Map.Entry> set) { } } When both are compiled at the same time, it works. But then change A and recompile, this leads to the following stack trace. java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.convertToRawType(LookupEnvironment.java:356) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.enclosingType(ParameterizedTypeBinding.java:255) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createRawType(LookupEnvironment.java:569) ... This looks like a problem with binary type binding. I confirm that using M7, I get the exact same stack trace than the original test case using the simpler test case in comment 5. Even simpler test case: B.java import java.util.Map; import java.util.Set; import java.util.SortedSet; public class B { static Set<Map.Entry> foo(SortedSet<Map.Entry> set) { return null; } } -------------------------------------- A.java public class A { A() { B.foo(null); } } Added GenericTypeTest#test714 Dup *** This bug has been marked as a duplicate of 97108 *** Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD |