Bug 46234 - Possible NullPointerException in Util.quickSort
Summary: Possible NullPointerException in Util.quickSort
Status: CLOSED DUPLICATE of bug 40950
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-06 15:10 EST by Troy Bishop CLA
Modified: 2005-05-24 11:24 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 Troy Bishop CLA 2003-11-06 15:10:50 EST
Using WSAD v5.1 (Eclipse v2.1.1) the following was displayed in the console:

Fri Oct 31 03:32:20 PST 2003 - Computing delta for project: eLVISTests
Fri Oct 31 03:32:20 PST 2003 - Finished computing delta, time: 0ms
Fri Oct 31 03:32:20 PST 2003 - Builder finished: ServiceProjectBuilder(eLVISTest
s) time: 0ms
Fri Oct 31 03:32:20 PST 2003 - Checking if need to build. Starting delta computa
tion between: ElementTree(9888) and ElementTree(10209)
Fri Oct 31 03:32:20 PST 2003 - End delta computation. (16ms).
!
{Global GC: Time elapsed (ms): 854.185
  Objects live:02229304 dead:00850157
  Bytes   live:113103988 dead:53587568
  Physical heap memory:178257920}
java.lang.NullPointerException
        at java.lang.Throwable.<init>(Throwable.java)
        at java.lang.Throwable.<init>(Throwable.java)
        at java.lang.NullPointerException.<init>(NullPointerException.java:63)
        at org.eclipse.jdt.internal.core.index.impl.Util.quickSort(Util.java)
        at org.eclipse.jdt.internal.core.index.impl.Util.sort(Util.java:292)
        at org.eclipse.jdt.internal.core.index.impl.InMemoryIndex.getSortedWordE
ntries(InMemoryIndex.java:134)
        at org.eclipse.jdt.internal.core.index.impl.SimpleIndexInput.open(Simple
IndexInput.java:118)
        at org.eclipse.jdt.internal.core.index.impl.MergeFactory.merge(MergeFact
ory.java:78)
        at org.eclipse.jdt.internal.core.index.impl.Index.merge(Index.java:243)
        at org.eclipse.jdt.internal.core.index.impl.Index.save(Index.java:348)
        at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex(
IndexManager.java)
        at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execu
te(AddJarFileToIndex.java)
        at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobMan
ager.java:360)
        at java.lang.Thread.run(Thread.java:802)
[Thread[Snapshot,5,main]] Operation started... :-)
Snapshot: starting...
Total Snap Markers: 266ms
Total Snap Sync Info: 0ms
Snapshot: 1953ms

JVM being used:

java version "1.3.1"
J9 - VM for the Java(TM) platform (build 2.1)
IBM J9SE VM (build 2.1, J2RE 1.3.1 IBM J9 build 20030904 (JIT enabled))

Do you believe this to be a problem with the Eclipse code, or the JVM?
Comment 1 John Wiegand CLA 2003-11-06 15:29:59 EST
The asArray() method discards null entries, but does not resize the array.
I didn't read close enough to determine if this may cause a NPE later.
Comment 2 Philipe Mulet CLA 2003-11-06 15:32:35 EST
This exception shouldn't be fatal, and the indexer will simply restart what it 
was doing (in background).

Comment 3 Kent Johnson CLA 2003-11-06 15:52:34 EST

*** This bug has been marked as a duplicate of 40950 ***
Comment 4 Troy Bishop CLA 2005-05-24 11:24:40 EDT
Closing old bug that is now fixed.