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 189353 - IndexOutOfBoundsException from ClassDumpSegment.getClassDumpByID
Summary: IndexOutOfBoundsException from ClassDumpSegment.getClassDumpByID
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Engine (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords: VISUALVM
: 189338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-10 12:54 UTC by Tomas Hurka
Modified: 2011-02-24 16:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2010-08-10 12:54:13 UTC
IndexOutOfBoundsException is thrown in some situations when Heap.getJavaClassByID() is invoked with instance id instead of class id. 


java.lang.IndexOutOfBoundsException: Index: 451168, Size: 25362
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.netbeans.lib.profiler.heap.ClassDumpSegment.getClassDumpByID(ClassDumpSegment.java:127)
	at org.netbeans.lib.profiler.heap.HprofHeap.getJavaClassByID(HprofHeap.java:251)
	at org.netbeans.modules.profiler.oql.engine.api.impl.Snapshot.findClass(Snapshot.java:109)
	at org.netbeans.modules.profiler.oql.engine.api.impl.OQLEngineImpl.executeQuery(OQLEngineImpl.java:215)
	at org.netbeans.modules.profiler.oql.engine.api.impl.OQLEngineImpl.executeQuery(OQLEngineImpl.java:129)
	at org.netbeans.modules.profiler.oql.engine.api.OQLEngine.executeQuery(OQLEngine.java:114)
[catch] at org.netbeans.modules.profiler.heapwalk.OQLController$1$1.run(OQLController.java:236)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Comment 1 Tomas Hurka 2010-08-10 13:14:43 UTC
Fixed in profiler-main

changeset:   175418:fc7f10cd783b
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Aug 10 15:08:24 2010 +0200
summary:     bugfix #189353, List.get() throws IndexOutOfBoundsException, make sure that the method returns correct ClassDump instance
Comment 2 Tomas Hurka 2010-08-11 07:53:46 UTC
*** Bug 189338 has been marked as a duplicate of this bug. ***
Comment 3 Quality Engineering 2010-08-12 02:58:21 UTC
Integrated into 'main-golden', will be available in build *201008120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fc7f10cd783b
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #189353, List.get() throws IndexOutOfBoundsException, make sure that the method returns correct ClassDump instance