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 120443 - AIOOBE on taking memory snapshot
Summary: AIOOBE on taking memory snapshot
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 10:41 UTC by Maksim Khramov
Modified: 2007-11-27 13:30 UTC (History)
0 users

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 Maksim Khramov 2007-10-30 10:41:38 UTC
Product Version: NetBeans IDE Dev (Build 200710291200)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Steps to reproduce:
Create sample DocumentEditor project.
Run profiling in Memory mode. (Select record stacktrace and GC, Record Stack Trace)
In Profiler Control panel click on Take Snapshot button multiple times, little *before* it enabled. The exception is thrown:

java.lang.ArrayIndexOutOfBoundsException: 1515
	at org.netbeans.lib.profiler.ui.memory.MemoryResultsPanel.sortResultsByClassName(MemoryResultsPanel.java:551)
	at org.netbeans.lib.profiler.ui.memory.LivenessResultsPanel.getResultsSortedByClassName(LivenessResultsPanel.java:214)
	at org.netbeans.lib.profiler.ui.memory.LivenessResultsPanel.getResultsSortedByLiveObjSize(LivenessResultsPanel.java:256)
	at org.netbeans.lib.profiler.ui.memory.LivenessResultsPanel.sortResults(LivenessResultsPanel.java:691)
	at org.netbeans.lib.profiler.ui.memory.LivenessResultsPanel.getResultsTable(LivenessResultsPanel.java:345)
	at org.netbeans.lib.profiler.ui.memory.MemoryResultsPanel.prepareResults(MemoryResultsPanel.java:181)
	at org.netbeans.modules.profiler.MemorySnapshotPanel.<init>(MemorySnapshotPanel.java:164)
	at org.netbeans.modules.profiler.SnapshotResultsWindow.displayMemoryResults(SnapshotResultsWindow.java:356)
	at org.netbeans.modules.profiler.SnapshotResultsWindow.<init>(SnapshotResultsWindow.java:184)
	at org.netbeans.modules.profiler.SnapshotResultsWindow.get(SnapshotResultsWindow.java:223)
	at org.netbeans.modules.profiler.ResultsManager.openSnapshot(ResultsManager.java:594)
	at org.netbeans.modules.profiler.ProfilerControlPanel2$ResultsSnippetPanel.snapshotTaken(ProfilerControlPanel2.java:849)
	at org.netbeans.modules.profiler.ProfilerControlPanel2.snapshotTaken(ProfilerControlPanel2.java:2009)
[catch] at org.netbeans.modules.profiler.ResultsManager$9.run(ResultsManager.java:952)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Jiri Sedlacek 2007-10-30 11:27:15 UTC
Based on the stacktrace this looks like a very similar problem to Issue 116672.
Comment 2 J Bachorik 2007-10-31 13:08:32 UTC
yes, it is similar to the aforementioned issue but the root cause lays in a different part of code
the problem was when trying to take snapshot during app startup. once the app is completely started up everything works fine

fixed

Checking in MemoryResultsSnapshot.java;
/cvs/profiler/libs/jfluid/src/org/netbeans/lib/profiler/results/memory/MemoryResultsSnapshot.java,v  <-- 
MemoryResultsSnapshot.java
new revision: 1.2; previous revision: 1.1
done
Comment 3 Maksim Khramov 2007-11-27 13:30:08 UTC
Verified in Build 200711261600