Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320203

Summary: [Javascript Validation] Giving a NullPointer Exception
Product: [WebTools] JSDT Reporter: Marc Chamberlin <marc>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Chamberlin CLA 2010-07-18 16:52:18 EDT
Build Identifier: Build id: 20100617-1415

Am trying to load a proprietary software package into Eclipse which contains a lot of JavaScript, JSP, HTML, and PHP scripts. I often am seeing the following error message with the associated stack walkback in the log file -

Errors running builder 'JavaScript Validator' on project 'Dome'.
java.lang.NullPointerException

and the log file shows -

!ENTRY org.eclipse.core.resources 4 75 2010-07-17 19:25:17.594
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.wst.jsdt.core 4 75 2010-07-17 19:25:17.594
!MESSAGE Errors running builder 'JavaScript Validator' on project 'Dome'.
!STACK 0
java.lang.NullPointerException
        at org.eclipse.wst.jsdt.internal.compiler.flow.UnconditionalFlowInfo.markAsDefinitelyNonNull(UnconditionalFlowInfo.java:1186)
        at org.eclipse.wst.jsdt.internal.compiler.ast.FieldReference.analyseAssignment(FieldReference.java:80)
        at org.eclipse.wst.jsdt.internal.compiler.ast.Assignment.analyseCode(Assignment.java:59)
        at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:155)
        at org.eclipse.wst.jsdt.internal.compiler.Compiler.process(Compiler.java:589)
        at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:347)
        at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:286)
        at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86)
        at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:225)
        at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58)
        at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291)
        at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:194)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
        at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:344)
        at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:179)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Sometimes

Steps to Reproduce:
1. I realize the developers will ask for an example file, so as to replicate the problem. However I do not know what is causing this problem and as I mentioned this is proprietary code, so I cannot supply it. But not having the source code should not limit the developers from doing a "white box" analysis of the stack trace. Look in the source code of Eclipse, and the JSDT internal compiler to do an analysis and ask why a null pointer exception might be occurring. It will take someone with significant knowledge of this area of JSDT to do a white box analysis, which is a task far beyond my own capabilities..  I will be willing to assist however I can, if you want me to try a specific test of some kind or provide non-proprietary information.
2. I have looked at similar bug reports, but could not find any with this particular stack walkback.
3.
Comment 1 Chris Jaun CLA 2010-07-19 10:29:21 EDT

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