This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
Summary: repository [IndexOutOfBoundsException: Index: 12, Size: 12]
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
: 243688 244510 245661 249415 249416 249447 249459 249573 257055 (view as bug list)
Depends on:
Blocks: 249412
  Show dependency tree
 
Reported: 2014-03-25 08:57 UTC by abalint21
Modified: 2016-08-31 20:45 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208666


Attachments
stacktrace (1.89 KB, text/plain)
2014-03-25 08:58 UTC, abalint21
Details
stacktrace (1.89 KB, text/plain)
2014-09-24 21:34 UTC, tbrunhoff
Details
stacktrace (1.89 KB, text/plain)
2014-09-24 21:37 UTC, tbrunhoff
Details
stacktrace (1.89 KB, text/plain)
2014-10-14 21:25 UTC, Vladimir Kvashin
Details
stacktrace (1.89 KB, text/plain)
2014-10-14 21:28 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abalint21 2014-03-25 08:57:58 UTC
This bug was originally marked as duplicate of bug 240503, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.0 (Build 201403022200)
VM: OpenJDK 64-Bit Server VM, 24.51-b03, OpenJDK Runtime Environment, 1.7.0_51-b31
OS: Linux

User Comments:
GUEST: I called Find Usages

tbrunhoff: Find usages, yielding no results.

GUEST: I was trying to do a "Find Usages" right click context menu while hovering over a private member function declaration in the header file for the class.

abalint21: No clue




Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 12, Size: 12
   at java.util.ArrayList.RangeCheck(ArrayList.java:635)
   at java.util.ArrayList.get(ArrayList.java:411)
   at java.util.Collections$UnmodifiableList.get(Collections.java:1211)
   at org.netbeans.modules.cnd.repository.storage.Storage$UnitIDReadConverterImpl.layerToClient(Storage.java:851)
   at org.netbeans.modules.cnd.indexing.impl.TextIndexStorage.toClientKey(TextIndexStorage.java:144)
   at org.netbeans.modules.cnd.indexing.impl.TextIndexStorage.query(TextIndexStorage.java:85)
Comment 1 abalint21 2014-03-25 08:58:00 UTC
Created attachment 146288 [details]
stacktrace
Comment 2 Exceptions Reporter 2014-04-03 08:19:20 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=208666
Comment 3 Exceptions Reporter 2014-05-28 07:00:38 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=208666
Comment 4 Alexander Simon 2014-08-12 06:31:47 UTC
20 reports => P2
Comment 5 Alexander Simon 2014-08-18 09:10:24 UTC
*** Bug 243688 has been marked as a duplicate of this bug. ***
Comment 6 Alexander Simon 2014-08-18 09:11:50 UTC
*** Bug 244510 has been marked as a duplicate of this bug. ***
Comment 7 thorstench 2014-09-24 09:18:06 UTC
On CentOS6.5 clearing <userHome>/.cache/netbeans/ seems to help.
Comment 8 tbrunhoff 2014-09-24 21:34:55 UTC
Created attachment 149504 [details]
stacktrace

searching text
Comment 9 tbrunhoff 2014-09-24 21:37:56 UTC
Created attachment 149505 [details]
stacktrace

"find usages"
Comment 10 Vladimir Kvashin 2014-10-14 21:25:01 UTC
Created attachment 149905 [details]
stacktrace

Reparsed the dbx project, then calling find usages
Comment 11 Vladimir Kvashin 2014-10-14 21:28:01 UTC
Created attachment 149906 [details]
stacktrace

reparsed dbx, then called find usages for o\push_aggr
Comment 12 Alexander Simon 2014-11-22 15:59:39 UTC
64 reports => P1
Comment 13 Maria Tishkova 2014-12-01 12:46:01 UTC
changeset:   281385:d73529c85185
tag:         tip
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Mon Dec 01 15:43:24 2014 +0400
summary:     attempt to fix bz#243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
Comment 14 Quality Engineering 2014-12-02 04:03:48 UTC
Integrated into 'main-silver', will be available in build *201412020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d73529c85185
User: Maria Dalmatova <mromashova@netbeans.org>
Log: attempt to fix bz#243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
invoke close of DocumentIndex on shutdown of the TextIndexStorage
added check (turned on in -ea mode) that what encoding/decoding is correct for (unitid,fileIndex) <-> CndTextKey
Comment 15 abalint21 2014-12-03 14:29:17 UTC
I've been using the nightly since it is available and had no issues with find usage. Thank you for the fix!
Comment 16 Quality Engineering 2014-12-16 04:22:31 UTC
Integrated into 'main-silver', will be available in build *201412160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b0ed11b3947d
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
- fix potential NPE after read (when empty string was written)
Comment 17 Maria Tishkova 2014-12-16 11:58:17 UTC
Full lists of commits:

changeset:   281928:5146e1f1b3d7
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Fri Dec 12 16:29:19 2014 +0400
summary:     we will never remove all information about the unit

changeset:   281789:8d3bc43bbc5f
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Dec 10 16:57:25 2014 +0400
summary:     spec version increased as API is changed

changeset:   281788:65d6d9b1803d
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Dec 10 16:57:25 2014 +0400
summary:     write unitID in index file

changeset:   281785:929539f83a6f
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Dec 10 13:31:03 2014 +0400
summary:     upgrade of spec version as API is changed

changeset:   281784:180a391e2242
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Dec 10 13:31:02 2014 +0400
summary:     repository serialization fix. units id which were written on disk were client long uin id (10000012) which is temporary value,

changeset:   281783:86fa315894ea
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Dec 10 13:30:57 2014 +0400
summary:     fixed incorrect usage of Boolean.valueOf

changeset:   281425:b421594b54e6
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Tue Dec 02 15:27:41 2014 +0400
summary:     correct fix for closing index

changeset:   281424:609fb134fe13
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Tue Dec 02 15:07:56 2014 +0400
summary:     fixed  exception occurred on shutdown
Comment 18 Maria Tishkova 2014-12-16 13:19:23 UTC
changeset:   282010:b0ed11b3947d
user:        Vladimir Voskresensky <vv159170@netbeans.org>
date:        Mon Dec 15 19:28:46 2014 +0300
summary:     extra fix for #243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
Comment 19 Quality Engineering 2014-12-20 05:28:03 UTC
Integrated into 'main-silver', will be available in build *201412200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b724e79a5862
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix #243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
- fix unit registration by index
Comment 20 Maria Tishkova 2014-12-22 13:23:10 UTC
*** Bug 245661 has been marked as a duplicate of this bug. ***
Comment 21 Maria Tishkova 2014-12-22 13:24:16 UTC
*** Bug 249459 has been marked as a duplicate of this bug. ***
Comment 22 Maria Tishkova 2014-12-22 13:24:19 UTC
*** Bug 249447 has been marked as a duplicate of this bug. ***
Comment 23 Maria Tishkova 2014-12-22 13:24:29 UTC
*** Bug 249415 has been marked as a duplicate of this bug. ***
Comment 24 Maria Tishkova 2014-12-22 13:24:39 UTC
*** Bug 249416 has been marked as a duplicate of this bug. ***
Comment 25 Quality Engineering 2014-12-23 04:36:19 UTC
Integrated into 'main-silver', will be available in build *201412230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/175e4eed858b
User: Maria Dalmatova <mromashova@netbeans.org>
Log: extra fix #243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
clean repository if no index file
do not use UnitIDReadConverter clientToLayer method -> it is illegal
Comment 26 Maria Tishkova 2015-01-12 09:43:15 UTC
*** Bug 249573 has been marked as a duplicate of this bug. ***
Comment 27 abalint21 2015-01-12 11:21:28 UTC
Can anyone tell me please when will there be a release with this patch beside the nightlies?
Thank you.
Comment 28 Vladimir Voskresensky 2015-01-12 13:10:33 UTC
(In reply to abalint21 from comment #27)
> Can anyone tell me please when will there be a release with this patch
> beside the nightlies?
> Thank you.
Hello,
We are just back from long NY/Christmas holidays. 
I hope patch for 8.0.2 to be ready during January.
Anyway it would be great if you can try nightly to verify that fix works in your env. 

Thanks,
Vladimir.
Comment 29 abalint21 2015-01-12 14:16:49 UTC
The fix is working great. I've been using the latest nightlies ever since.
Comment 30 Quality Engineering 2015-04-04 05:16:37 UTC
Integrated into 'main-silver', will be available in build *201504040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/30ffdf691778
User: Alexander Simon <alexvsimon@netbeans.org>
Log: extra fix #243240 - repository [IndexOutOfBoundsException: Index: 12, Size: 12]
- fix typo of extra fix "fix FS registration by index"
Comment 31 Maria Tishkova 2016-08-31 20:45:24 UTC
*** Bug 257055 has been marked as a duplicate of this bug. ***