Some heap dumps appear to be kind of broken, String.value contains null for some instances. This almost consistently
happens for me when dumping from JDK 6u16.
The problem is that for some OQL queries this could cause a NPE being thrown from the HeapWalker which is not very nice.
Try to run the following query for the attached heap dump:
select toHtml(a) + " = " + a.toString() from java.lang.String a where a.hash == 0
A workaround seems to be using this modified query:
select toHtml(a) + " = " + a.value.toString() from java.lang.String a where a.hash == 0
which reports javax.script.ScriptException in the Query Results view but doesn't affect the HeapWalker itself.
Created attachment 89603 [details]
Fixed in profiler-main
user: Tomas Hurka <firstname.lastname@example.org>
date: Fri Oct 16 15:11:29 2009 +0200
summary: bugfix #174727, value field in String instacne can be null
Integrated into 'main-golden', will be available in build *200910170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Hurka <email@example.com>
Log: bugfix #174727, value field in String instacne can be null