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 98592 - non-heap dump files not handled gracefully
Summary: non-heap dump files not handled gracefully
Status: RESOLVED DUPLICATE of bug 92576
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-22 05:54 UTC by _ gsporar
Modified: 2007-03-23 09:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gsporar 2007-03-22 05:54:53 UTC
If I choose Profile > Load Heap Dump and then choose a file that is *not* a
valid JVM heap dump file, the Profiler does not fail gracefully.  Either I get:

1. Nothing - no feedback at all

or 

2. An exception.  One example is below:

java.nio.BufferUnderflowException
	at java.nio.Buffer.nextGetIndex(Buffer.java:474)
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:205)
	at
com.sun.tools.profiler.heap.HprofMappedByteBuffer.readStringNull(HprofMappedByteBuffer.java:65)
	at
com.sun.tools.profiler.heap.HprofMappedByteBuffer.readHeader(HprofMappedByteBuffer.java:45)
	at
com.sun.tools.profiler.heap.HprofMappedByteBuffer.<init>(HprofMappedByteBuffer.java:40)
	at com.sun.tools.profiler.heap.HprofHeap.<init>(HprofHeap.java:85)
	at com.sun.tools.profiler.heap.HeapFactory.createHeap(HeapFactory.java:48)
	at com.sun.tools.profiler.heap.HeapFactory.createHeap(HeapFactory.java:31)
	at
org.netbeans.modules.profiler.heapwalk.HeapWalker.createHeap(HeapWalker.java:158)
	at org.netbeans.modules.profiler.heapwalk.HeapWalker.<init>(HeapWalker.java:50)
	at org.netbeans.modules.profiler.heapwalk.ui.OpenHeapWa


Seems like if the file is not a binary heap dump file then the Profiler should
display an appropriate error message.
Comment 1 Tomas Hurka 2007-03-23 09:47:53 UTC
Yes, some kind of warning is needed.
Comment 2 Tomas Hurka 2007-03-23 09:50:50 UTC

*** This issue has been marked as a duplicate of 92576 ***