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 200352 - ArrayIndexOutOfBoundsException when sorting Hot Spots
Summary: ArrayIndexOutOfBoundsException when sorting Hot Spots
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.0
Hardware: PC Other
: P3 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 13:17 UTC by alexander.burdukov
Modified: 2014-04-16 19:11 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 alexander.burdukov 2011-07-25 13:17:01 UTC
Steps to reproduce:
1. Profile an aplication using CPU profiler
2. Go to Hot Spots View, select View option = Methods
3. Select last row in the table
4. Select View option = Packages
5. Try to sort by package name column

As the result you will got following exception:

java.lang.ArrayIndexOutOfBoundsException: 745
	at org.netbeans.lib.profiler.results.cpu.FlatProfileContainerBacked.getMethodNameAtRow(FlatProfileContainerBacked.java:92)
	at org.netbeans.lib.profiler.ui.cpu.FlatProfilePanel$4.getValueAt(FlatProfilePanel.java:689)
	at org.netbeans.lib.profiler.ui.components.table.ExtendedTableModel.getValueAt(ExtendedTableModel.java:135)
	at javax.swing.JTable.getValueAt(JTable.java:2686)
	at org.netbeans.lib.profiler.ui.cpu.FlatProfilePanel$4.sortByColumn(FlatProfilePanel.java:721)
	at org.netbeans.lib.profiler.ui.components.table.ExtendedTableModel.sortByColumn(ExtendedTableModel.java:163)
	at org.netbeans.lib.profiler.ui.components.table.SortableTableModel$HeaderListener.mouseClicked(SortableTableModel.java:97)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6270)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6032)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

It seams that selectet row used from methods view when number of rows in the table is greater than in package view.
Selection must be cleared or recalculated in some way when View option is changed.
Comment 1 Jiri Sedlacek 2011-09-06 14:57:20 UTC
Fixed by http://hg.netbeans.org/profiler-main/rev/b8b389e60d87.
Comment 2 Quality Engineering 2011-09-07 14:33:28 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/b8b389e60d87
User: Jiri Sedlacek <jis@netbeans.org>
Log: Bugfix #200352 - clear selection when changing aggregation level
Comment 3 alexander.burdukov 2014-04-16 17:17:32 UTC
Verified on NB 8.0