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.
Summary: | ArrayIndexOutOfBoundsException: 1 | ||
---|---|---|---|
Product: | platform | Reporter: | chrislundin <chrislundin> |
Component: | Lookup | Assignee: | Jaroslav Tulach <jtulach> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | gsahhluwalia, jskrivanek, mmirilovic, mschovanek, unr303 |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=10323 | ||
Issue Type: | DEFECT | Exception Reporter: | 10323 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace java.lang.ArrayIndexOutOfBoundsException: 1 stacktrace stacktrace stacktrace stacktrace stacktrace ide log stacktrace stacktrace |
Description
chrislundin
2007-12-08 12:45:54 UTC
Created attachment 54026 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200712100000) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows XP, 5.1, x86 User Comments: It happens very often in automated tests since build 200712071200. I am able to reproduce it manually but not always: - start with empty userdir - create a new java project - create a new package - copy Main.java - Paste|Copy Refactor into newly created package - open it in editor - close all files in editor file by file starting at left. When everything is closed the Navigator shows nothing and it has title "null - Navigator". - focus Projects view or Files view and exception is thrown Created attachment 54094 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200712091200) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Linux, 2.6.22-14-386, i386 User Comments: Created attachment 54139 [details]
stacktrace
THIS ISSUE HAS 5 MORE DUPLICATES Build: NetBeans IDE Dev (Build 080104) VM: Java HotSpot(TM) Client VM, 1.5.0_14-b03 OS: Linux, 2.6.20-16-generic, i386 User Comments: I just invoked 'close all documents' from context menu od an editor tab. Created attachment 54682 [details]
stacktrace
Web automated tests randomly failing due this issue, increasing priority to P2. THIS ISSUE HAS 5 MORE DUPLICATES *** Issue 119292 has been marked as a duplicate of this issue. *** *** Issue 122378 has been marked as a duplicate of this issue. *** I have simulated the problem: # This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: openide/util/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java --- openide/util/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java Base (1.10) +++ openide/util/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java Locally Modified (Based On 1.10) @@ -488,4 +487,47 @@ assertEquals("C is overriden from removeLookupListener", Collections.emptyList(), res.allInstances()); } + + + public void testArrayIndexWithSetLookupAsInIssue123679() throws Exception { + final ProxyLookup pl = new ProxyLookup(); + final int[] cnt = { 0 }; + + class L extends Lookup { + L[] set; + Lookup l; + Collection<? extends Serializable> res; + + public L(String s) { + l = Lookups.singleton(s); } + + @Override + public <T> T lookup(Class<T> clazz) { + return l.lookup(clazz); + } + + @Override + public <T> Result<T> lookup(Template<T> template) { + cnt[0]++; + if (set != null) { + pl.setLookups(set); + res = pl.lookupAll(Serializable.class); + } + Result<T> r = l.lookup(template); + return r; + } + } + + L[] now = { new L("A"), new L("B") }; + L[] old = { new L("C") }; + pl.setLookups(old); + old[0].set = now; + + Result<String> res = pl.lookupResult(String.class); + assertEquals("Old items visible", 1, res.allItems().size()); + + + pl.setLookups(new L("X"), new L("Y"), new L("Z")); + } +} #123679: Make setLookups really reentrant IDE:------------------------------------------------- IDE: [16.1.08 9:46] Committing started Checking in test/unit/src/org/openide/util/lookup/ProxyLookupTest.java; /shared/data/ccvs/repository/openide/util/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java,v <-- ProxyLookupTest.java new revision: 1.11; previous revision: 1.10 done Checking in src/org/openide/util/lookup/ProxyLookup.java; /shared/data/ccvs/repository/openide/util/src/org/openide/util/lookup/ProxyLookup.java,v <-- ProxyLookup.java new revision: 1.18; previous revision: 1.17 done IDE: [16.1.08 9:46] Committing finished Verified. Still reproducible by automated tests, see attachment. Created attachment 55307 [details]
java.lang.ArrayIndexOutOfBoundsException: 1
Build: NetBeans IDE Dev (Build 080120) VM: Java HotSpot(TM) Client VM, 1.6.0_05-ea-b04 OS: Linux, 2.6.20-16-generic, i386 User Comments: Created attachment 55435 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200801222102) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows XP, 5.1, x86 User Comments: -opened old mobility projects in 6.1M1 -the exception appeared when the IDE were compiling the opened project (on background) Created attachment 55478 [details]
stacktrace
Build: NetBeans IDE Dev (Build 20080125171737) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows XP, 5.1, x86 User Comments: -closing VW project Created attachment 55598 [details]
stacktrace
Walking by class methods by clicking them in navigator window and got this exception. Product Version = NetBeans IDE Dev (Build 200801290002) Operating System = Windows XP version 5.1 running on x86 SEVERE [global] java.lang.ArrayIndexOutOfBoundsException: 1 at org.openide.util.lookup.ProxyLookup$R.lookupChange(ProxyLookup.java:407) at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:187) Build: NetBeans IDE Dev (Build 200802040003) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows Vista, 6.0, x86 User Comments: I accidentaly dragged and dropped a tab with diff of one project so it wasn't on the tabpane as other opened files. To fix this I closed it and then invoked Diff from Mercurial View. After that, the exception was thrown. Created attachment 55996 [details]
stacktrace
THIS ISSUE HAS ALREADY 100 DUPLICATES Build: NetBeans IDE Dev (Build 20080205131109) VM: Java HotSpot(TM) Client VM, 1.6.0_05-ea-b04 OS: Linux, 2.6.20-16-generic, i386 User Comments: Created attachment 56131 [details]
stacktrace
Created attachment 56213 [details]
ide log
*** Issue 123562 has been marked as a duplicate of this issue. *** Reopening because reproduced. Steps: have a project with looot of java files. The AIOOBE appears when selecting lot of the files in projects view with SHIFT + arrow key Product Version: NetBeans IDE Dev (Build 200802110004) Java: 1.6.0_03-ea; Java HotSpot(TM) Client VM 1.6.0_03-ea-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) SEVERE [global] java.lang.ArrayIndexOutOfBoundsException: 15 at org.openide.util.lookup.ProxyLookup$R.lookupChange(ProxyLookup.java:416) at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:189) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction$LastActivatedWindowLookup.updateLookups(LookupSensitiveAction.java:218) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction$LastActivatedWindowLookup.propertyChange(LookupSensitiveAction.java:223) *** Issue 126929 has been marked as a duplicate of this issue. *** THIS ISSUE HAS ALREADY 100 DUPLICATES Build: NetBeans IDE Dev (Build 200802120006) VM: Java HotSpot(TM) Client VM, 1.5.0_13-121 OS: Mac OS X, 10.4.11, i386 User Comments: Browsing .java source in Navigator view Created attachment 56588 [details]
stacktrace
*** Issue 127265 has been marked as a duplicate of this issue. *** Build: NetBeans IDE Dev (Build 20080214091453) VM: Java HotSpot(TM) Client VM, 1.5.0_12-b04 OS: Linux, 2.6.20-16-generic, i386 User Comments: Created attachment 56705 [details]
stacktrace
648ccb6d7e7d ProxyLookup was rewritten quite a lot. It uses immutable internal data structures. This issue shall be eliminated. *** Issue 127955 has been marked as a duplicate of this issue. *** Seems to be fixed. backported into release601_fixes /cvs/openide/util/src/org/openide/util/lookup/Attic/ProxyLookup.java,v <-- ProxyLookup.java new revision: 1.17.10.1; previous revision: 1.17 done /cvs/openide/util/test/unit/src/org/openide/util/lookup/Attic/ProxyLookupTest.java,v <-- ProxyLookupTest.java new revision: 1.10.10.1; previous revision: 1.10 done /cvs/openide/util/test/unit/src/org/openide/util/lookup/Attic/SimpleProxyLookupIssue42244Test.java,v <-- SimpleProxyLookupIssue42244Test.java new revision: 1.3.16.1; previous revision: 1.3 done When are these release601_fixes released? http://wiki.netbeans.org/NetBeans601Patch2Plan Planned release date: Mar 21 2008 *** Issue 124405 has been marked as a duplicate of this issue. *** Removing release601_fixes_candidate2/ release601_fixes_fixed status whiteboard values. The fix cannot be ported to the fixes branch, since it cannot be made available on the update center. Rolled back the changes in release601_fixes branch: Checking in src/org/openide/util/lookup/ProxyLookup.java; /cvs/openide/util/src/org/openide/util/lookup/Attic/ProxyLookup.java,v <-- ProxyLookup.java new revision: 1.17.10.2; previous revision: 1.17.10.1 done Checking in test/unit/src/org/openide/util/lookup/ProxyLookupTest.java; /cvs/openide/util/test/unit/src/org/openide/util/lookup/Attic/ProxyLookupTest.java,v <-- ProxyLookupTest.java new revision: 1.10.10.2; previous revision: 1.10.10.1 done Checking in test/unit/src/org/openide/util/lookup/SimpleProxyLookupIssue42244Test.java; /cvs/openide/util/test/unit/src/org/openide/util/lookup/Attic/SimpleProxyLookupIssue42244Test.java,v <-- SimpleProxyLookupIssue42244Test.java new revision: 1.3.16.2; previous revision: 1.3.16.1 done |