Bug 69152 - [NPE] An internal error occurred during: "Override indicator installation job".
Summary: [NPE] An internal error occurred during: "Override indicator installation job".
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-01 12:28 EDT by Dan Kehn CLA
Modified: 2004-09-06 10:29 EDT (History)
1 user (show)

See Also:


Attachments
jdt.core patch (106.22 KB, patch)
2004-07-06 15:43 EDT, Jim des Rivieres CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kehn CLA 2004-07-01 12:28:54 EDT
Version: 3.0.0
Build id: 200406251208

The above error is displayed after launching the workbench w/the Java editor 
open.

java.lang.ExceptionInInitializerError
at org.eclipse.jdt.core.dom.AST.newConditionalExpression(AST.java:2517)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1652)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:911)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2077)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1843)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:770)
at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations
(ASTConverter.java:336)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:274)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:152)
at org.eclipse.jdt.core.dom.ASTParser.convert(ASTParser.java:711)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:681)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:574)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST
(ASTProvider.java:439)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST
(ASTProvider.java:391)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$8.run
(JavaEditor.java:3775)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.core.dom.ASTNode.addProperty(ASTNode.java:1728)
at org.eclipse.jdt.core.dom.ConditionalExpression.<clinit>
(ConditionalExpression.java:59)
... 16 more

eclipse.buildId=I200406251208
java.version=1.4.2_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Comment 1 Olivier Thomann CLA 2004-07-04 10:13:06 EDT
Would you have a test case to reproduce?
Comment 2 Dan Kehn CLA 2004-07-06 09:06:09 EDT
Sorry, I don't a step-by-step recreation steps.  It occurred after importing 
some external plug-ins and restarting.  Next time I will save the workspace 
for later diagnosis.
Comment 3 Olivier Thomann CLA 2004-07-06 10:34:15 EDT
This might be a concurrency issue.
Comment 4 Olivier Thomann CLA 2004-07-06 10:35:37 EDT
Reopen.
Comment 5 Olivier Thomann CLA 2004-07-06 10:36:58 EDT
Jim,

I don't think that setting the properties is thread-safe. Is it possible that
the static initializer is called in two different threads?
Comment 6 Jim des Rivieres CLA 2004-07-06 11:52:26 EDT
I see the problem. The static file tempPDL is declared in ASTNode. This means 
that there is conflict if more than one ASTNode subclass is being initialized 
at the same time.
Comment 7 Jim des Rivieres CLA 2004-07-06 15:43:33 EDT
Created attachment 12988 [details]
jdt.core patch
Comment 8 Jim des Rivieres CLA 2004-07-06 15:52:12 EDT
This problem can show up whenever several threads are triggering AST node 
class initializations simultaneously.

I reworked AST node static initializers to no longer use a static variable in 
ASTNode.

Released to HEAD (3.1). Updated build notes.

Philippe, This is a candidate fix for inclusion in 3.0.1. (Attached patch 
makes it easy to apply to 3.0.1 if needed.)
Comment 9 Philipe Mulet CLA 2004-07-07 07:14:17 EDT
Fine by me. Olivier please review the change and release it if ok.
Comment 10 Philipe Mulet CLA 2004-07-07 07:14:42 EDT
Reopening until addressed in 3.0.1 stream.
Comment 11 Olivier Thomann CLA 2004-07-07 10:47:32 EDT
The patch looks good. Now each node has its own list.
Comment 12 Olivier Thomann CLA 2004-07-17 19:02:58 EDT
Fixed and released in 3_0_maintenance stream.
Comment 13 David Audel CLA 2004-09-06 10:29:29 EDT
Verified for 3.0.1 RC1