jvisualvm: Stuck on "Loading Heap Dump" screen
Asked Answered
D

2

2

I created a heap dump file with hprof using this command:

java -agentlib:hprof -cp "..\..\jars\trove.jar;.\bin" com.mysite.MyApp

This successfully created the file "java.hprof.txt" which was about 5MB. I then opened up jvisualvm to view this file, and loaded it in. But visualvm appears to be stuck on the loading screen. The screen below has been up for about 10 minutes now.

Did I miss a step? Should I have used different options on the command line with hprof? How can I read this heap dump file?

visualvm screenshot

Dentil answered 9/5, 2013 at 12:11 Comment(0)
A
2

VisualVM supports heap dumps in binary HPROF format. It is easier to use VisualVM to create heap dump. If this is not possible use VisualVM, you can use jmap -dump:live,format=b,file=heap.bin <pid>. The advantage is that you don't need any special startup arguments and there is no slow down caused by hprof agent library.

Affection answered 10/5, 2013 at 10:57 Comment(0)
C
0

In my case, I have resolved this issue by changing file permission of heapdump file. It turned out VisualVM tried to load the file but permission is denied (which is strange since VisualVM is the one created the dump file), however VisualVM does NOT give you error message. I have downloaded the eclipse memory analyzer (https://www.eclipse.org/mat/downloads.php). It gives me an error message.

Compo answered 3/2, 2016 at 20:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.