Bug 43809 - NPE from java compiler
Summary: NPE from java compiler
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-28 14:42 EDT by G. Zsombor CLA
Modified: 2003-09-29 09:22 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 G. Zsombor CLA 2003-09-28 14:42:37 EDT
This occured just once for me, while I editing a java source. After this error,
I couldn't save the file, nor could I compile.



!ENTRY org.eclipse.jdt.core 4 4 szept. 28, 2003 20:02:47.14
!MESSAGE Exception occurred during problem detection:
!STACK 0
java.lang.NullPointerException
        at
org.eclipse.jdt.internal.compiler.codegen.ConstantPool.literalIndex(ConstantPool.java(Compiled
Code))
        at
org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfo(ClassFile.java:406)
        at
org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfos(ClassFile.java:539)
        at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java(Compiled
Code))
        at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:531)
        at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:176)
        at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:598)
        at
org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:172)
        at
org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:139)
        at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:198)
        at
org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:448)
        at
org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:881)
        at
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:48)
        at
org.eclipse.jdt.internal.core.JavaModelOperation.execute(JavaModelOperation.java:365)
        at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:704)
        at
org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:484)
        at
org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:994)
        at
org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:970)
        at
org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:963)
        at
org.eclipse.jdt.internal.ui.javaeditor.filebuffers.CompilationUnitDocumentProvider2.saveDocument(CompilationUnitDocumentProvider2.java:822)
        at
org.eclipse.ui.texteditor.AbstractTextEditor$17.execute(AbstractTextEditor.java:3170)
        at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)
Comment 1 Philipe Mulet CLA 2003-09-29 04:15:16 EDT
Which JRE are you running Eclipse on ?
Comment 2 Philipe Mulet CLA 2003-09-29 04:21:54 EDT
Offending code is:
int descriptorIndex = constantPool.literalIndex(fieldBinding.type.signature());

Would be a field binding with no type.
Comment 3 Philipe Mulet CLA 2003-09-29 04:50:05 EDT
Would you have steps to reproduce ? Likely, the source of the file you were 
editing would do it.
Comment 4 G. Zsombor CLA 2003-09-29 05:10:00 EDT
I use IBM JDK 1.4.1 on Linux.
Comment 5 Olivier Thomann CLA 2003-09-29 07:44:06 EDT
We had some cases like this that were JIT issues. Disabling the JIT fixed all 
of them.
Have a look at bug 38146, bug 41231, bug 41398 and bug 41818. Try changing the 
VM for a Sun VM or disable the jit (-Djava.compiler=NONE).
Comment 6 Philipe Mulet CLA 2003-09-29 09:22:23 EDT
This JRE is indeed known to have defficiencies (not final build yet).
Please reopen if symptoms persist with alternate VM (or disabling the JIT). 
Then we will need steps to reproduce.