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.
Created attachment 121959 [details] tack Discovered in tests log, seems not to be quite stable. Was most likely introduced by my recent changes. java.lang.IndexOutOfBoundsException: Index: 9, Size: 0 java.util.ArrayList.RangeCheck(ArrayList.java:547) java.util.ArrayList.get(ArrayList.java:322) org.netbeans.modules.cnd.repository.util.IntToStringCache.getValueById(IntToStringCache.java:166) org.netbeans.modules.cnd.repository.translator.RepositoryTranslatorImpl.getFileNameById(RepositoryTranslatorImpl.java:114) org.netbeans.modules.cnd.apt.utils.APTSerializeUtils.getFileNameById(APTSerializeUtils.java:110) org.netbeans.modules.cnd.apt.utils.APTSerializeUtils.readFileNameIndex(APTSerializeUtils.java:121) org.netbeans.modules.cnd.apt.utils.APTSerializeUtils.readFileNameIndex(APTSerializeUtils.java:128) org.netbeans.modules.cnd.apt.support.StartEntry.<init>(StartEntry.java:101) See full stack in the attachment
Created attachment 121961 [details] stack
Integrated into 'main-golden', will be available in build *201207130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b27061779b72 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: better diagnostic for #215449 - IndexOutOfBoundsException in RepositoryTranslatorImpl.getFileNameById
Created attachment 122053 [details] Another stack
Created attachment 122130 [details] More stacks that are slightly different
fixed: http://hg.netbeans.org/cnd-main/rev/098f6532e291
Although the cases that I knew are fixed, a new one appeared. A very similar stack appears when removing and recreating a project exactly in the same place. Investigation shows that if a project has been removed (either from IDE or from command line between IDE sessions) and then recreated in the same place, then, when instantiating, code model tries to load the existing one from cache, which is obviously incorrect. This should be the reason of new stacks (I wasn't able to 100% reproduce situation, that's why I'm not 100% sure)
Should be fixed by http://hg.netbeans.org/cnd-main/rev/9470dee88751 http://hg.netbeans.org/cnd-main/rev/d960e262f14f http://hg.netbeans.org/cnd-main/rev/cd13abeb21a6
Integrated into 'main-golden', will be available in build *201207190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/098f6532e291 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixed #215449 - IndexOutOfBoundsException in RepositoryTranslatorImpl.getFileNameById