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.
WindowsXP / JDK5u8 / NetBeans 5.5 Beta 2 / Profiler 5.5 Beta 2 I doubt I can reproduce this.... I was doing CPU profiling and I selected Profile > View > Threads. I *think* what happened next was I clicked on the icon in the new window to enable threads monitoring - but I honestly don't recall for certain (it all happened so fast! :-) ). In any event, the AIOOB popped up: java.lang.ArrayIndexOutOfBoundsException: 3964 at com.sun.tools.profiler.results.cpu.FlatProfileContainerFree.getMethodNameAtRow(FlatProfileContainerFree.java:62) at com.sun.tools.profiler.ui.cpu.FlatProfilePanel$5.getValueAt(FlatProfilePanel.java:564) at com.sun.tools.profiler.ui.components.ExtendedTableModel.getValueAt(ExtendedTableModel.java:113) at javax.swing.JTable.getValueAt(JTable.java:1903) at javax.swing.JTable.prepareRenderer(JTable.java:3911) at javax.swing.JTable.getToolTipText(JTable.java:2573) at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:649) at javax.swing.Timer.fireActionPerformed(Timer.java:271) [catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
This just happened again, but I still can't get it to reproduce every time. :-( Use the attached project. 1. Do CPU profiling of the entire application. 2. Click the "Live Results" button in the Profiler control panel. This will bring up the Hot Spots window. 3. When the profiled application starts, put in 1000000 and then click the "Calculate Prime Numbers" button. 4. In the Projects window expand the project, the source, the classes, and the methods until you can see the construct() method in the PrimeCalculator class. Right-click construct() and add it as a root method to the "Preset: Part of Application" configuration. 5. Modify Profiling. Switch to "part of application." Since a root method has already been selected it should indicate 1 method. 6. Click the OK button. 7. The Modify Profiling dialog disappears. The Hot Spots window is still visible (as it should be). The IDE appears to sort of hang for just a brief moment at this point: the "Modifying Instrumentation" progress bar is displayed in the lower-right corner, but it is not moving. Then I get the the AIIOOB that was originally reported. Could this be some sort of odd race condition where the Hot Spots window is trying to update (repaint) but because the instrumentation is being changed (or has just changed), the data it needs is no longer available? In any event, the problem appears to be non-fatal. I can continue to profile and the Hot Spot window eventually redraws correctly, etc. So maybe lower this to a P4?
Created attachment 33220 [details] Sample project
*** Issue 83392 has been marked as a duplicate of this issue. ***
Indeed there was a race condition accessing some internal members of ProfilingSessionStatus class. Now all relevant access is being synchronized so the race condition is avoided