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 57573 - [41cat] Debugger IndexOutOFBoundsException in TreeModels
Summary: [41cat] Debugger IndexOutOFBoundsException in TreeModels
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: THREAD
: 58153 59212 61883 63109 65896 66177 66307 67592 68418 (view as bug list)
Depends on:
Blocks: 63501
  Show dependency tree
 
Reported: 2005-04-07 03:59 UTC by schwarcz
Modified: 2010-04-29 09:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (101.36 KB, text/plain)
2005-04-07 04:00 UTC, schwarcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schwarcz 2005-04-07 03:59:18 UTC
[ BUILD # : 20050329 ]
[ JDK VERSION : 1.5.0_02 ]

IndexOutOfBoundsException during debugging.

Annotation: Exception occurred in Request Processor
java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.netbeans.modules.debugger.jpda.models.LocalsTreeModel.getLocalVariables(LocalsTreeModel.java:247)
	at org.netbeans.modules.debugger.jpda.models.LocalsTreeModel.getLocalVariables(LocalsTreeModel.java:217)
	at org.netbeans.modules.debugger.jpda.models.LocalsTreeModel.getChildren(LocalsTreeModel.java:73)
	at org.netbeans.spi.viewmodel.Models$DelegatingTreeModel.getChildren(Models.java:826)
	at org.netbeans.modules.debugger.jpda.ui.FixedWatchesManager.getChildren(FixedWatchesManager.java:103)
	at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:482)
	at org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilterSI.getChildren(VariablesTreeModelFilterSI.java:137)
	at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:482)
	at org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilter.getChildren(VariablesTreeModelFilter.java:83)
	at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:482)
	at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildren(Models.java:2032)
	at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.refreshChildren(TreeModelNode.java:359)
	at org.netbeans.modules.viewmodel.TreeModelNode$4.run(TreeModelNode.java:343)
	at org.openide.util.Task.run(Task.java:189)
Comment 1 schwarcz 2005-04-07 04:00:07 UTC
Created attachment 21439 [details]
IDE log
Comment 2 Roman Ondruska 2005-04-13 16:07:30 UTC
Ok, we will look at it.
Comment 3 Martin Entlicher 2005-08-16 17:04:40 UTC
*** Issue 61883 has been marked as a duplicate of this issue. ***
Comment 4 Martin Entlicher 2005-08-16 17:08:43 UTC
Copying evaluation from issue #59212:

getChildren() must not rely that "from" and "to" arguments are correct! This is
true for *all* models. Things can change in between. (between getChildrenCount()
and getChildren()). The impl. must be smart...
Comment 5 Martin Entlicher 2005-08-16 17:09:13 UTC
*** Issue 59212 has been marked as a duplicate of this issue. ***
Comment 6 Martin Entlicher 2005-08-26 10:18:02 UTC
*** Issue 63109 has been marked as a duplicate of this issue. ***
Comment 7 Martin Entlicher 2005-10-06 14:34:51 UTC
*** Issue 65896 has been marked as a duplicate of this issue. ***
Comment 8 Martin Entlicher 2005-10-06 14:42:35 UTC
Starting to work on this... we need to fix this into 5.0, there're too many
duplicates...
Comment 9 Martin Entlicher 2005-10-06 17:11:37 UTC
I'll have to check the bounds in all getChildren() implementation.
Then we can return something like Integer.MAX_VALUE in getChildrenCount(), since
that method is completely useless now. - To improve the performace (issue #59058).
Comment 10 Martin Entlicher 2005-10-06 17:12:25 UTC
*** Issue 58153 has been marked as a duplicate of this issue. ***
Comment 11 Martin Entlicher 2005-10-06 17:31:13 UTC
Fixed in various models in trunk:

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/AbstractVariable.java,v
 <--  AbstractVariable.java
new revision: 1.35; previous revision: 1.34

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ClassesTreeModel.java,v
 <--  ClassesTreeModel.java
new revision: 1.11; previous revision: 1.10

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/LocalsTreeModel.java,v
 <--  LocalsTreeModel.java
new revision: 1.33; previous revision: 1.32

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java,v
 <--  WatchesModel.java
new revision: 1.22; previous revision: 1.21

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/BreakpointsTreeModel.java,v
 <--  BreakpointsTreeModel.java
new revision: 1.8; previous revision: 1.7

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/SessionsTreeModel.java,v
 <--  SessionsTreeModel.java
new revision: 1.5; previous revision: 1.4

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/SourcesModel.java,v
 <--  SourcesModel.java
new revision: 1.15; previous revision: 1.14
Comment 12 Martin Entlicher 2005-10-07 09:19:49 UTC
*** Issue 66177 has been marked as a duplicate of this issue. ***
Comment 13 Martin Entlicher 2005-10-10 09:33:18 UTC
*** Issue 66307 has been marked as a duplicate of this issue. ***
Comment 14 Martin Entlicher 2005-10-26 15:17:29 UTC
*** Issue 67592 has been marked as a duplicate of this issue. ***
Comment 15 Martin Entlicher 2005-11-10 11:23:18 UTC
*** Issue 68418 has been marked as a duplicate of this issue. ***
Comment 16 Quality Engineering 2010-04-29 09:22:04 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.