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 116030 - java.lang.ArrayIndexOutOfBoundsException: 10 >= 8
Summary: java.lang.ArrayIndexOutOfBoundsException: 10 >= 8
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
: 149537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-19 16:11 UTC by novakm
Modified: 2009-03-31 19:54 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 1347


Attachments
stacktrace (2.38 KB, text/plain)
2007-09-19 16:11 UTC, novakm
Details
stacktrace (2.81 KB, text/plain)
2007-12-20 10:38 UTC, testeng
Details
stacktrace (2.90 KB, text/plain)
2008-01-11 08:40 UTC, lcourtin
Details
stacktrace (2.90 KB, text/plain)
2008-03-20 13:53 UTC, bartvdc
Details
stacktrace (2.89 KB, text/plain)
2008-09-11 10:20 UTC, Jiri Prox
Details
stacktrace (2.90 KB, text/plain)
2008-10-20 20:56 UTC, Jesse Glick
Details
stacktrace (1.34 KB, text/plain)
2008-12-04 17:20 UTC, vagnermontenegro
Details
stacktrace (2.89 KB, text/plain)
2009-02-24 17:54 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description novakm 2007-09-19 16:11:07 UTC
Build: NetBeans IDE 6.0 Beta 1 (Build 200709141330)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Windows Vista, 6.0, x86

User Comments: 
I invoked extract interface, checked several things to extract and chose preview. Then I clicked various nodes
in the preview which resulted in IAE and AIOOBE.
Comment 1 novakm 2007-09-19 16:11:15 UTC
Created attachment 49083 [details]
stacktrace
Comment 2 Jan Becicka 2007-09-24 07:39:46 UTC
It looks like a Swing bug...
Comment 3 Jan Becicka 2007-10-03 12:31:23 UTC
Cannot reproduce.
Comment 4 testeng 2007-12-20 10:38:14 UTC
Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105
OS: Windows XP, 5.1, x86

User Comments: 
Dear Mr / Ms,

I was refactoring a simple class and used the preview option. When clicking on a item (in the refactoring window (output)) to see what would change this exception occured.

Kind regards,

Henri de Ruiter
Comment 5 testeng 2007-12-20 10:38:18 UTC
Created attachment 54409 [details]
stacktrace
Comment 6 lcourtin 2008-01-11 08:40:32 UTC
Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 1.5.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 
Refactor, rename on a static field (the field was hidding another field).
Comment 7 lcourtin 2008-01-11 08:40:37 UTC
Created attachment 54936 [details]
stacktrace
Comment 8 bartvdc 2008-03-20 13:53:39 UTC
Build: NetBeans IDE 6.1 Beta (Build 200803050202)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105
OS: Windows XP, 5.1, x86

User Comments: 
encapsulate field
Comment 9 bartvdc 2008-03-20 13:53:42 UTC
Created attachment 58748 [details]
stacktrace
Comment 10 Exceptions Reporter 2008-06-05 13:32:58 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=1347
Comment 11 _ pcw 2008-09-10 22:49:17 UTC
A one year old issue with over 20 duplicates yet it's a P4 with no evaluation?

Please reevaluate issue, including potential causes and justification for priority.

FWIW, I just reproduced this in NetBeans 6.5, Sep 10 nightly build so it's still current.
Comment 12 Jiri Prox 2008-09-11 10:19:49 UTC
Build: NetBeans IDE Dev (Build 20080908074124)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28
OS: Windows XP, 5.1, x86

User Comments: 
AIOOBE when collapsing node in preview

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 8 >= 7
        at java.util.Vector.removeElementAt(Vector.java:511)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1583)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1277)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:170)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeCollapsed(BasicTreeUI.java:3731)
        at javax.swing.JTree.fireTreeCollapsed(JTree.java:2690)
Comment 13 Jiri Prox 2008-09-11 10:20:00 UTC
Created attachment 69629 [details]
stacktrace
Comment 14 Jan Pokorsky 2008-10-08 17:24:50 UTC
IMO it is caused by expanding/collapsing JTree nodes outside EDT in RefactoringPanel.
Comment 15 Jan Pokorsky 2008-10-08 17:27:21 UTC
*** Issue 149537 has been marked as a duplicate of this issue. ***
Comment 16 Jesse Glick 2008-10-20 20:56:07 UTC
Build: NetBeans IDE Dev (Build 081014)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.24-21-generic, i386

User Comments: 
Refactoring preview dialog appeared with strange window bounds and corrupted tree view on the left.

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 14 >= 10
        at java.util.Vector.removeElementAt(Vector.java:511)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1583)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1277)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:170)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeCollapsed(BasicTreeUI.java:3731)
        at javax.swing.JTree.fireTreeCollapsed(JTree.java:2690)
Comment 17 Jesse Glick 2008-10-20 20:56:11 UTC
Created attachment 72310 [details]
stacktrace
Comment 18 vagnermontenegro 2008-12-04 17:20:06 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.util.EmptyStackException
        at java.util.Stack.peek(Stack.java:85)
        at java.util.Stack.pop(Stack.java:67)
        at javax.swing.JTree.setExpandedState(JTree.java:3357)
        at javax.swing.JTree.expandPath(JTree.java:2166)
        at javax.swing.JTree.expandRow(JTree.java:2181)
        at org.netbeans.modules.refactoring.spi.impl.CheckNodeListener.selectNextPrev(CheckNodeListener.java:297)
Comment 19 vagnermontenegro 2008-12-04 17:20:16 UTC
Created attachment 74546 [details]
stacktrace
Comment 20 pzajac 2009-02-24 17:54:19 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Linux, 2.6.24-22-generic, i386

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 9 >= 9
        at java.util.Vector.removeElementAt(Vector.java:511)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1583)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(VariableHeightLayoutCache.java:1277)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:170)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeCollapsed(BasicTreeUI.java:3731)
        at javax.swing.JTree.fireTreeCollapsed(JTree.java:2690)
Comment 21 pzajac 2009-02-24 17:54:24 UTC
Created attachment 77313 [details]
stacktrace
Comment 22 Jan Pokorsky 2009-03-30 18:16:45 UTC
fixed as http://hg.netbeans.org/jet-main/rev/01bf375b45a2
Comment 23 Quality Engineering 2009-03-31 19:54:44 UTC
Integrated into 'main-golden', will be available in build *200903311400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/01bf375b45a2
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #116030: run expand/collaps inside EDT