Bug 257095 - [compiler] JDT NullPointerException
Summary: [compiler] JDT NullPointerException
Status: VERIFIED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 11:45 EST by Charles Doucette CLA
Modified: 2009-01-28 05:46 EST (History)
1 user (show)

See Also:


Attachments
.log file with sequence of events and errors (54.19 KB, text/plain)
2008-12-01 11:45 EST, Charles Doucette CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Doucette CLA 2008-12-01 11:45:23 EST
Created attachment 119167 [details]
.log file with sequence of events and errors

Build ID: M20080911-1700

Steps To Reproduce:
1.All I've done is open my workspace, and apparently automatic build is enabled. This causes Eclipse to crash. I'm not sure what file it doesn't like - but I did just determine what project it doesn't like.
2.
3.


More information:
!SESSION 2008-11-12 10:36:39.022 -----------------------------------------------
eclipse.buildId=M20080911-1700
java.version=1.5.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -vm C:\Java\jdk1.5.0_16 -vm C:\Java\jdk1.5.0_16
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -vm C:\Java\jdk1.5.0_16 -data C:\software\trunk\vsw\workspaces\eclipse -vm C:\Java\jdk1.5.0_16

This is a continuation of log file C:\software\trunk\vsw\workspaces\eclipse\.metadata\.bak_0.log
Created Time: 2008-11-12 10:38:11.789

!ENTRY org.eclipse.core.resources 4 2 2008-11-12 10:38:11.789
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:60)
	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:40)
	at org.eclipse.jdt.internal.compiler.ast.WhileStatement.analyseCode(WhileStatement.java:115)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:90)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:670)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:253)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:118)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:749)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
	at java.lang.Thread.run(Thread.java:595)

!ENTRY org.eclipse.core.resources 2 75 2008-11-12 10:38:17.586
!MESSAGE Errors during build.
!SUBENTRY 1 org.eclipse.jdt.core 2 75 2008-11-12 10:38:17.586
!MESSAGE Errors running builder 'Java Builder' on project 'auth'.
!SUBENTRY 1 org.eclipse.jdt.core 2 75 2008-11-12 10:38:17.586
!MESSAGE java.lang.NullPointerException encountered while running Java Builder.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:60)
	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:40)
	at org.eclipse.jdt.internal.compiler.ast.WhileStatement.analyseCode(WhileStatement.java:115)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:90)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:670)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:253)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:118)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:749)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
	at java.lang.Thread.run(Thread.java:595)

p.s. I am running Eclipse 64-bit on a 64-bit version of Java on Windows 64.
Comment 1 Philipe Mulet CLA 2008-12-03 08:08:19 EST
Any steps to reproduce ?
Would you have the source for the file which caused the compiler crash ?
Comment 2 Charles Doucette CLA 2008-12-05 15:34:14 EST
I can no longer reproduce that exact error.
I should have backed up my workspace before I tried to fix it.
It is now in an improved state.

As I said, I believe I know what project it was attempting to
compile when it died. That project contains many source files.
It also depends on many other projects that contain many source files.

Ideally, you would like a small reproduceable example to track down
and resolve the underlying problem. Unfortunately, it appears that
I can't provide that.

I'm hoping that you'll be able to work-around the exhibited problem
(i.e. don't dereference something that may be null) even if you can't
solve the underlying problem that caused it to be null in the first place.

Chuck
Comment 3 Philipe Mulet CLA 2009-01-22 07:02:38 EST
It is unfortunately not that simple. According to the trace, the null pointer would denote an issue upstream; it is not something the code should be recovering from at this stage.

Did it occur once ? Several times ? All the times ?
Could just be a VM JIT bug... these tend to cause NPE at times in the middle of fine code.
Comment 4 Philipe Mulet CLA 2009-01-28 05:36:45 EST
Closing as non reproduceable any longer.
Comment 5 Philipe Mulet CLA 2009-01-28 05:43:30 EST
.
Comment 6 Philipe Mulet CLA 2009-01-28 05:44:38 EST
Should have closed as NOT_ECLIPSE, due to suspicion on 64-bit runtime causing grief and lack of better steps.

If assumption was proven wrong, please reopen with steps to reproduce.
Comment 7 Frederic Fusier CLA 2009-01-28 05:46:43 EST
Verified for 3.5M5