Bug 31014 - [infrastructure] exception in indexer
Summary: [infrastructure] exception in indexer
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-05 14:31 EST by Adam Kiezun CLA
Modified: 2004-03-24 11:08 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2003-02-05 14:31:53 EST
!ENTRY org.eclipse.jdt.core 4 4 Feb 05, 2003 18:20:39.220
!MESSAGE Background Indexer Crash Recovery
!STACK 0
java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at 
org.eclipse.jdt.internal.core.index.impl.GammaCompressedIndexBlock.nextEntry
(GammaCompressedIndexBlock.java:85)
	at 
org.eclipse.jdt.internal.core.index.impl.BlocksIndexInput.moveToNextWordEntry
(BlocksIndexInput.java:186)
	at org.eclipse.jdt.internal.core.index.impl.MergeFactory.mergeReferences
(MergeFactory.java:176)
	at org.eclipse.jdt.internal.core.index.impl.MergeFactory.merge
(MergeFactory.java:85)
	at org.eclipse.jdt.internal.core.index.impl.Index.merge(Index.java:249)
	at org.eclipse.jdt.internal.core.index.impl.Index.save(Index.java:354)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex
(IndexManager.java:423)
	at 
org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndexes
(IndexManager.java:459)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager.notifyIdle
(IndexManager.java:297)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run
(JobManager.java:333)
	at java.lang.Thread.run(Thread.java:484)
Comment 1 Philipe Mulet CLA 2003-02-05 17:47:49 EST
Adam - you seem pretty unlucky. Do you have steps to reproduce it ?
Comment 2 Adam Kiezun CLA 2003-02-06 04:54:32 EST
no, sorry
i just found it in the log (after a day of working)
i had some OutOfMemory exceptions that day so maybe it's related
Comment 3 Olivier Thomann CLA 2003-02-19 14:26:47 EST
Fix title.
Comment 4 Philipe Mulet CLA 2003-03-05 06:13:46 EST
Defer
Comment 5 Philipe Mulet CLA 2003-06-13 04:49:32 EDT
Reopening. Problem should go away with new implementation
Comment 6 Troy Folger CLA 2003-06-16 16:46:37 EDT
I am working on a relatively large project (5000+ .java files) using Eclipse 
2.1 M1, and I am getting a similar stack trace (see below).

I see the problem when using the Type browser; if I hit Shift-Ctrl-T
(or pick "Open Type" from the navigate menu) in this project I get an 
Exception dialog stating: "Unreported exception.  See log for details."

Here is the detail from the log message:

Log Session:
============
java.version=1.3.1_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -install file:C:/eclipse/

Status Details:
===============
java.lang.reflect.InvocationTargetException: 
java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at 
org.eclipse.jdt.internal.core.index.impl.GammaCompressedIndexBlock.nextEntry
(GammaCompressedIndexBlock.java:85)
	at 
org.eclipse.jdt.internal.core.index.impl.BlocksIndexInput.queryEntriesPrefixedBy
(BlocksIndexInput.java:285)
	at 
org.eclipse.jdt.internal.core.search.matching.SearchPattern.findIndexMatches
(SearchPattern.java:1161)
	at 
org.eclipse.jdt.internal.core.search.matching.SearchPattern.findIndexMatches
(SearchPattern.java:1148)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.search
(PatternSearchJob.java:150)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.execute
(PatternSearchJob.java:93)
	at 
org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob
(JobManager.java:282)
	at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames
(SearchEngine.java:592)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache.doSearchTypes
(AllTypesCache.java:130)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache.getAllTypes
(AllTypesCache.java:90)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache.getTypes
(AllTypesCache.java:66)
	at org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog$1.run
(TypeSelectionDialog.java:191)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:101)


I get almost the same exact stack trace if I attempt to open the Type 
Hierarchy on a class.  I don't get the error on a smaller project.

Also, I tried using j2sdk 1.4 with eclipse but get the same error.
Comment 7 Troy Folger CLA 2003-06-17 09:56:52 EDT
Just a final note - I was able to avoid the bug by removing several unused jars
from my classpath (in addition to the 5000+ files, there are 30-odd jars on the
CLASSPATH!).
Comment 8 Troy Folger CLA 2003-07-17 19:53:47 EDT
This problem remains in 2.1.1.
Comment 9 Kent Johnson CLA 2004-02-17 14:21:20 EST
We have replaced the entire index infrastructure.

This bug is now obsolete.
Comment 10 Jerome Lanneluc CLA 2004-03-24 11:08:10 EST
Verified in build I200403240800.