Community
Participate
Working Groups
I get one or more of the following exception whenever I perform a CTRL-SHIFT-T and types are missing from the dialog. The build I am using is I20070220-0800. java.lang.ArrayIndexOutOfBoundsException: 2084 at org.eclipse.jdt.internal.core.index.DiskIndex.readStreamInt(DiskIndex.java:1033) at org.eclipse.jdt.internal.core.index.DiskIndex.readCategoryTable(DiskIndex.java:675) at org.eclipse.jdt.internal.core.index.DiskIndex.mergeCategory(DiskIndex.java:434) at org.eclipse.jdt.internal.core.index.DiskIndex.mergeCategories(DiskIndex.java:426) at org.eclipse.jdt.internal.core.index.DiskIndex.mergeWith(DiskIndex.java:519) at org.eclipse.jdt.internal.core.index.Index.save(Index.java:176) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex(IndexManager.java:583) at org.eclipse.jdt.internal.core.search.indexing.SaveIndex.execute(SaveIndex.java:40) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:372) at java.lang.Thread.run(Thread.java:595)
Frederic - we need to pull your latest changes until we can track this down.
Restarting Eclipse seems to have fixed the problem.
So, it seems not really critical in fact. Can you attach the .log to have the full story of exceptions you got?
Created attachment 59490 [details] Log file
I could not reproduce this problem opening many different workspaces with integration build I20070220-1330. Michael cannot reproduce either after having cleaned all index files and restart the workspace. Unfortunately the .log file does not give more clues while these exceptions occurred So, I think we can wait a little bit before reverting the change on DiskIndex, but I'll still try to figure out how this AIOOBE can happen...
Created attachment 59507 [details] Proposed patch I think I've found a potential issue which could explain the AIOOBE
I got the exception in a eclipse 3.0 full source workspace (performance tests) and verified that patch fixes the problem....
Created attachment 59597 [details] New proposed patch This new patch also includes an optimization for write*(...) methods provided by Kent
The patch also includes added performance tests to highlight the gain with this big change on DiskIndex (several tests in FullSourceWorkspaceSearchTests) and a new test suite FullSourceWorkspaceCompleteSearchTests which performs all possible search request on the eclipse 3.0 full source workspace to verify that the AIOOBE does not occur any longer. Note that this new test suite is not run while running JDT/Core performance tests as it would take too much time. Released for 3.3 M6 in HEAD stream.
*** Bug 175176 has been marked as a duplicate of this bug. ***
*** Bug 175671 has been marked as a duplicate of this bug. ***
Verified for 3.3 M6 using build I20070320-0010
Note that the patch for R3_2_maintenance in bug 171653 also includes a fix for this bug. So this bug doesn't need to be backport to R3_2_maintenance per se.