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 113183 - NPE on taking memory snapshot
Summary: NPE on taking memory snapshot
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 10:27 UTC by Jiri Sedlacek
Modified: 2007-08-31 14:39 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 Jiri Sedlacek 2007-08-20 10:27:03 UTC
Open the IDE, create new AnagramGame, start memory profiling with default settings and try to take snapshot as soon as 
the Take Snapshot gets enabled:

java.lang.NullPointerException
        at com.sun.tools.profiler.ui.memory.SnapshotAllocResultsPanel.fetchResultsFromSnapshot
(SnapshotAllocResultsPanel.java:62)
        at com.sun.tools.profiler.ui.memory.SnapshotAllocResultsPanel.<init>(SnapshotAllocResultsPanel.java:48)
        at org.netbeans.modules.profiler.MemorySnapshotPanel.<init>(MemorySnapshotPanel.java:112)
        at org.netbeans.modules.profiler.SnapshotResultsWindow.displayMemoryResults(SnapshotResultsWindow.java:251)
        at org.netbeans.modules.profiler.SnapshotResultsWindow.<init>(SnapshotResultsWindow.java:149)
        at org.netbeans.modules.profiler.SnapshotResultsWindow.get(SnapshotResultsWindow.java:87)
        at org.netbeans.modules.profiler.ResultsManager.openSnapshot(ResultsManager.java:716)
        at org.netbeans.modules.profiler.ProfilerControlPanel2$ResultsSnippetPanel.snapshotTaken
(ProfilerControlPanel2.java:1417)
        at org.netbeans.modules.profiler.ProfilerControlPanel2.snapshotTaken(ProfilerControlPanel2.java:389)
        at org.netbeans.modules.profiler.ResultsManager$4.run(ResultsManager.java:271)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
[catch] 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 Alexander Kouznetsov 2007-08-22 12:34:21 UTC
I got an NPE on Take Snapshot button click after played with the profiled AnagramGame application so "as soon as 
the Take Snapshot gets enabled" note doesn't seem to be obligatory.
Comment 2 J Bachorik 2007-08-31 14:39:53 UTC
this is fixed in Dev Build 20070831
the "Take Snapshot" button is now correctly enabled/disabled thus preventing user trying to take snapshot in an
inappropriate time