Bug 124857 - Internal Compiler Error
Summary: Internal Compiler Error
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2006-01-23 09:54 EST by Tor Egil Jacobsen CLA
Modified: 2009-08-30 02:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tor Egil Jacobsen CLA 2006-01-23 09:54:18 EST
I am not sure abaout the version and the target milestone information, but it was the latest Eclipse 3.1.1 SDK...

I have been developing on an application for quite a while and suddenly an internal Compiler Error emerged. This happened at my computer at work and I assumed that the error would go away if I downloaded the latest build (which I did not have). This did not work, and the same problem occured on my home computer as well. What is especially annoying about this error is that because of the null-pointer the compiler does not continue to compile the rest of the project so that the bin-folder does not contain the files which are supposed to be compiled after the exception...

It is impossible to see what makes this happen. I made an ant-target which use the 'javac' commando in ant and everything compiles.

Here is the exception/trace:
Internal compiler error
java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy(FieldBinding.java:76)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.findField(Scope.java:783)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleStaticImport(CompilationUnitScope.java:472)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:455)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:321)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:390)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:497)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:240)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:190)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:50)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:213)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:141)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
	Xxxxxxxxx.java	xxxxxx/xxx/xxxx/xx/xxxxxx/xxxx	line 0	23. januar 2006 13:38:07
Comment 1 Olivier Thomann CLA 2006-01-23 09:59:08 EST
Could you please check if this is fixed using the latest 3.1.x maintenance build?
Please don't set the target milestone. This is set by us once we fix the defect.
Comment 2 Olivier Thomann CLA 2006-01-23 12:43:06 EST
Could you please provide a test case that would expose the problem?
This could allow us to speed up the resolution of this issue.
Comment 3 Tor Egil Jacobsen CLA 2006-01-24 03:33:12 EST
(In reply to comment #2)
> Could you please provide a test case that would expose the problem?
> This could allow us to speed up the resolution of this issue.

What do you mean? Test case that expose the problem? I had a lot of JUnit tests in my project but they are not compiled because of the null-pointer-exception.

And here is the trouble about test cases to expose the problem: I do not know what causes the problem so I do not know how to re-create it. Another thing: I don't think this is a common problem as I have used Eclipse IDE for over a year without encountering the problem...
Comment 4 Tor Egil Jacobsen CLA 2006-01-24 03:54:16 EST
I have discovered the problem!

If you use static import you will get this exception.
Comment 5 Philipe Mulet CLA 2006-01-24 06:11:09 EST
Looks encouraging, can you pls construct a testcase and attach it to this bug report ?
Comment 6 Philipe Mulet CLA 2006-01-24 06:12:13 EST
Side note: You could have saved yourself one year of pain by reporting this issue earlier <g>.
Comment 7 Philipe Mulet CLA 2006-01-24 06:16:07 EST
Please reopen once steps to reproduce get attached.
Comment 8 Tor Egil Jacobsen CLA 2006-01-24 06:53:07 EST
I wouldn't save myself one year of pain since I recently (this weekend) refactored my code to include static imports... I reported it instantly...

Do you still want me to make a test case? Heres the test case: Make a source file and use JDK 1.5_06 and use a static import
Comment 9 Olivier Thomann CLA 2006-03-13 14:51:03 EST
Is it still failing using 3.1.2 or 3.2 integration builds?
It would be nice to have a test case in order to add a regression test.
Comment 10 Tor Egil Jacobsen CLA 2006-03-18 18:43:36 EST
It is still failing under the 3.1.2 build.

What is the integration builds?

After some testing I can't find a pattern, but it seems to work when using static imports from the JDK (1.5.0._06 - import static java.io.File.separator;), but sometimes (not always) it fails to use static imports from beans one have developed one self...
Comment 11 Olivier Thomann CLA 2006-03-18 19:29:11 EST
If you have a reproducable test case, please attach it to the bug report and we will investigate.
Comment 12 Denis Roy CLA 2009-08-30 02:06:04 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.