Bug 93995 - NPE, ArrayIndexOutOfBounds, opening type hierarchy after checkout
Summary: NPE, ArrayIndexOutOfBounds, opening type hierarchy after checkout
Status: RESOLVED DUPLICATE of bug 93826
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-06 16:06 EDT by John Arthorne CLA
Modified: 2005-05-09 03:31 EDT (History)
2 users (show)

See Also:


Attachments
Log file (233.60 KB, text/plain)
2005-05-06 16:06 EDT, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2005-05-06 16:06:21 EDT
Build: N20050506-0010

1) I checked out org.eclipse.pde.* into my workspace
2) After it completed, I tried to open a type hierarchy on the class "Job".
3) I received a flood of error dialogs and > 200KB of error messages in my log file.

From looking at the log, it looks like the initial problem is the PDE resource
change listener throwing the NPE.  However, this appears to cause damage to the
JDT core state, possibly causing all the out of bounds exceptions.

Logging against PDE, but there is likely a JDT problem here as well.  I will
attach the log file, but here is the top of each of the error stack traces.

First stack:

java.lang.NullPointerException
	at
org.eclipse.pde.internal.core.WorkspaceModelManager$ModelChange.equals(WorkspaceModelManager.java:52)
	at java.util.ArrayList.indexOf(ArrayList.java:245)
	at java.util.ArrayList.contains(ArrayList.java:226)
	at
org.eclipse.pde.internal.core.WorkspaceModelManager.handleFileDelta(WorkspaceModelManager.java:206)
	at
org.eclipse.pde.internal.core.WorkspaceModelManager.visit(WorkspaceModelManager.java:477)

Second stack:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
	at
org.eclipse.jdt.internal.core.util.BindingKeyParser.parseInnerType(BindingKeyParser.java:629)
	at
org.eclipse.jdt.internal.core.util.BindingKeyParser.parse(BindingKeyParser.java:527)
	at
org.eclipse.jdt.internal.core.util.BindingKeyParser.parse(BindingKeyParser.java:511)
	at org.eclipse.jdt.core.BindingKey.isParameterizedType(BindingKey.java:208)
Comment 1 John Arthorne CLA 2005-05-06 16:06:44 EDT
Created attachment 20789 [details]
Log file
Comment 2 John Arthorne CLA 2005-05-06 16:17:55 EDT
I was able to easily reproduce this.  It happens every time I open a type
hierarchy on "Job" in my workspace.  This happens even right after startup, in a
session where the NPE from PDE did not occur.  I'm going to move to JDT
(although the PDE NPE is clearly also a bug).
Comment 3 Wassim Melhem CLA 2005-05-06 21:33:06 EDT
The NPE in PDE is a dup of bug 91750.

A method could potentially return null and we were not guarding against that.
Comment 4 Jerome Lanneluc CLA 2005-05-09 03:31:42 EDT

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