Bug 38043 - NPE during rebuild of Java source file
Summary: NPE during rebuild of Java source file
Status: RESOLVED DUPLICATE of bug 28934
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 blocker (vote)
Target Milestone: 3.0 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-23 10:38 EDT by Bill Callahan CLA
Modified: 2003-06-02 06:13 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 Bill Callahan CLA 2003-05-23 10:38:09 EDT
One particular Java source file in my project causes a null pointer exception
whenever it tries to build.  Not only does this file not compile, but the
exception prevents any other files not yet processed to not be compiled either.  

The dialog box says:
-----------------------------
Build problems

Errors during build.
  java.lang.NullPointerException encountered while running
org.eclipse.jdt.internal.core.builder.JavaBuilder.
------------------------------------

The task list has this additional information:
----------------------------------------------------
Error			Internal compiler error

java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfo(ClassFile.java:434)
	at org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfos(ClassFile.java:579)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:694)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:762)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:709)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:770)
	at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:158)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:543)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:337)
	at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:194)
	at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:144)
	at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:49)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:179)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:102)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:384)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:852)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:120)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:176)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:186)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:146)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:852)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:160)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:211)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:173)
	at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:156)
	at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:95)
	<source file name and location was here>	line 0
Comment 1 Olivier Thomann CLA 2003-05-23 10:59:52 EDT
Could you please provide a test case to reproduce it?
Which build are you using?
Comment 2 Olivier Thomann CLA 2003-05-23 11:02:59 EDT
It looks like a duplicate of bug 28934. This has been fixed a while ago. Which
build are you using? If you are using 2.1, then provide a test case.
Comment 3 Bill Callahan CLA 2003-05-23 11:06:15 EDT
Here's the Eclipse Platform information:

Version: 2.1
Build id: 200212181304

I'll see about putting together a test case.  The file that fails right now has
proprietary code in it, so I'll have to do some scrubbing before I can submit it.

Bill
Comment 4 Philipe Mulet CLA 2003-05-23 11:22:08 EDT
Then this is the same problem. You should move to a release 2.1 build. The one 
you were using was an intermediate build and this problem got addressed since 
then.
Comment 5 Philipe Mulet CLA 2003-05-23 11:23:39 EDT
should have closed as duplicate
Comment 6 Philipe Mulet CLA 2003-05-23 11:24:03 EDT

*** This bug has been marked as a duplicate of 28934 ***