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 258287

Summary: NullPointerException at org.netbeans.modules.profiler.heapwalk.ui.ClassesListControllerUI.showSubclassesForClass
Product: profiler Reporter: bartvdc <bartvdc>
Component: BaseAssignee: Jiri Sedlacek <jis>
Status: RESOLVED FIXED    
Severity: normal Keywords: VISUALVM
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 222919
Attachments: stacktrace

Description bartvdc 2016-03-09 10:08:41 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-b27
OS: Windows 7

User Comments:
bartvdc: profiling, while comparing 2 heapdump




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.profiler.heapwalk.ui.ClassesListControllerUI.showSubclassesForClass(ClassesListControllerUI.java:983)
   at org.netbeans.modules.profiler.heapwalk.ui.ClassesListControllerUI.access$1700(ClassesListControllerUI.java:155)
   at org.netbeans.modules.profiler.heapwalk.ui.ClassesListControllerUI$7.actionPerformed(ClassesListControllerUI.java:581)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
Comment 1 bartvdc 2016-03-09 10:08:43 UTC
Created attachment 158783 [details]
stacktrace
Comment 2 Jiri Sedlacek 2016-06-17 14:28:23 UTC
Selecting a heap dump B to compare with the currently viewed heap dump A only computes differences of instance counts and reachable/retained sizes. The rest of functions (like listing subclasses and viewing instances) still shows just the data from heap dump A.

In this case the class selected for listing subclasses was only present in heap dump B and the operation failed by throwing a NPE because the class was unknown to heap dump A.
Comment 3 Jiri Sedlacek 2016-06-17 14:45:35 UTC
Now handled the same way as the Show in Instances View action - a message is displayed that the class is not available in the base heap dump.

Fixed by http://hg.netbeans.org/profiler-main/rev/8c4a1b6b3207.
Comment 4 Quality Engineering 2016-06-29 01:47:15 UTC
Integrated into 'main-silver', will be available in build *201606290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8c4a1b6b3207
User: Jiri Sedlacek <jis@netbeans.org>
Log: Bugfix #258287 - do not resolve subclasses of a class not present in the base heap