Skip to content

NPE in StringDecoder.<init> #373

@thurka

Description

@thurka

Describe the bug
Use heap dump from GraalVM native-image JDK 11+. Preview or logical value for UTF-8 encoded strings throws NPE.

java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.graalvm.visualvm.lib.jfluid.heap.JavaClass.getValueOfStaticField(String)" is null
	at org.graalvm.visualvm.lib.profiler.heapwalk.details.api.StringDecoder.<init>(StringDecoder.java:48)
	at org.graalvm.visualvm.heapviewer.truffle.details.SourceSectionView.getString(SourceSectionView.java:215)
	at org.graalvm.visualvm.heapviewer.truffle.details.SourceSectionView.computeView(SourceSectionView.java:112)
	at org.graalvm.visualvm.lib.profiler.heapwalk.details.spi.DetailsProvider$View$1.run(DetailsProvider.java:125)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

Desktop (please complete the following information):

  • OS: macOS
  • JDK version JDK 8
  • Version 2.1.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions