6

Eclipse Memory Analyzer prompts me only with this message: "Invalid HPROF file header".

Stack dump:

    java.io.IOException: Invalid HPROF file header.
    at org.eclipse.mat.hprof.AbstractParser.readVersion(AbstractParser.java:135)
    at org.eclipse.mat.hprof.Pass1Parser.read(Pass1Parser.java:69)
    at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:65)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:184)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:102)
    at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:114)
    at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:94)
    at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:54)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The HPROF file was made on a Linux machine.

HAT doesn't work and the IBM HeapAnalyzer is to complicated, but did work.

What can I do to make it work?

trincot
  • 317,000
  • 35
  • 244
  • 286
veronica
  • 61
  • 1
  • 1
  • 2

2 Answers2

4

I had the same issue. Adding the flag "format=b" fixed the issue. Apparently, Memory Analyzer can only read binary files.

Jason Finns
  • 49
  • 1
  • 2
1

If you're using a java service wrapper, most likely the JVM got killed before it could finish writing the heap dump. You may want to set a property for the service wrapper that will give the vm more time to complete the heap dump.

mmicheo
  • 21
  • 1