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 67836 - IllegalArgumentException when trying to take a snapshot during Analyze Memory Usage
Summary: IllegalArgumentException when trying to take a snapshot during Analyze Memory...
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All Windows ME/2000
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-31 14:42 UTC by mflagg
Modified: 2007-02-20 18:10 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 mflagg 2005-10-31 14:42:12 UTC
I get the following exception when I try to save a snapshot of a Analyze Memory 
Usage session.
java.lang.IllegalArgumentException: invalid range properties
	at javax.swing.DefaultBoundedRangeModel.<init>
(DefaultBoundedRangeModel.java:85)
	at javax.swing.JProgressBar.<init>(JProgressBar.java:289)
	at com.sun.tools.profiler.ui.components.CustomBarCellRenderer.<init>
(CustomBarCellRenderer.java:21)
	at com.sun.tools.profiler.ui.memory.AllocResultsPanel.setColumnsData
(AllocResultsPanel.java:240)
	at com.sun.tools.profiler.ui.memory.AllocResultsPanel.getResultsTable
(AllocResultsPanel.java:359)
	at com.sun.tools.profiler.ui.memory.MemoryResultsPanel.prepareResults
(MemoryResultsPanel.java:187)
	at org.netbeans.modules.profiler.MemorySnapshotPanel.<init>
(MemorySnapshotPanel.java:78)
	at 
org.netbeans.modules.profiler.SnapshotResultsWindow.displayMemoryResults
(SnapshotResultsWindow.java:193)
	at org.netbeans.modules.profiler.SnapshotResultsWindow.<init>
(SnapshotResultsWindow.java:117)
	at org.netbeans.modules.profiler.SnapshotResultsWindow.get
(SnapshotResultsWindow.java:69)
	at org.netbeans.modules.profiler.ResultsManager.openSnapshot
(ResultsManager.java:524)
	at org.netbeans.modules.profiler.ProfilerControlPanel2
$ResultsSnippetPanel.snapshotTaken(ProfilerControlPanel2.java:1094)
	at org.netbeans.modules.profiler.ProfilerControlPanel2.snapshotTaken
(ProfilerControlPanel2.java:277)
	at org.netbeans.modules.profiler.ResultsManager$3.run
(ResultsManager.java:213)
	at org.netbeans.profiler.common.CommonUtils.runInEventDispatchThread
(CommonUtils.java:20)
	at org.netbeans.modules.profiler.ResultsManager.fireSnapshotTaken
(ResultsManager.java:210)
	at org.netbeans.modules.profiler.ResultsManager.takeSnapshot
(ResultsManager.java:147)
	at org.netbeans.modules.profiler.ProfilerControlPanel2
$ResultsSnippetPanel.actionPerformed(ProfilerControlPanel2.java:1014)
	at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1786)
	at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
(AbstractButton.java:1839)
	at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonListener.java:245)
	at java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:231)
	at java.awt.Component.processMouseEvent(Component.java:5100)
	at java.awt.Component.processEvent(Component.java:4897)
	at java.awt.Container.processEvent(Container.java:1569)
	at java.awt.Component.dispatchEventImpl(Component.java:3615)
	at java.awt.Container.dispatchEventImpl(Container.java:1627)
	at java.awt.Component.dispatchEvent(Component.java:3477)
	at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:3483)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
	at java.awt.Container.dispatchEventImpl(Container.java:1613)
	at java.awt.Window.dispatchEventImpl(Window.java:1606)
	at java.awt.Component.dispatchEvent(Component.java:3477)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Comment 1 iformanek 2005-11-04 12:56:35 UTC
Thansk for the bug report.
Was this with Milestone 9?

I spent some time digging through the code, and the only possible cause for 
this is if a size of some objects was negative. It is unclear how this could 
happen (or rather where the bug leading to this could be).

Are you able to reproduce this and/or have you run into this more than once?
Comment 2 iformanek 2005-11-04 16:19:07 UTC
From Matthew:

No this is Milestone 8 on Netbeans 4.1.  I have been able to reproduce
it.  I have a project that uses significant memory (eventually hits
600MB) and runs for a very long time (7-10 hrs).  If I wait 20 to 30
minutes between taking snapshots with profiling the entire application,
I get the error.  If I take snapshots every 10-15 minutes it seems to be
fine.  So basically the longer I wait to take snapshots the more like
the error is to occur.
Comment 3 iformanek 2005-11-04 16:56:48 UTC
Fixed in M10, the problem was caused by casting long to int for the progress 
indication, which failed for very large number of objects.

Thanks for reporting the problem.
Comment 4 ehucka 2006-10-09 12:11:50 UTC
Verification of old issues.
Comment 5 Alexander Kouznetsov 2007-02-20 10:26:46 UTC
Closing old issues
Comment 6 Alexander Kouznetsov 2007-02-20 18:10:05 UTC
Reverting to original Target Milestone value changed by mistake. Sorry for
inconvenience.