| Summary: | Can't open phd if txt file exists in same directory | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] MAT | Reporter: | Brian Peacock <brian_peacock> | ||||
| Component: | Core | Assignee: | Project Inbox <mat.core-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | andrew_johnson | ||||
| Version: | 1.0 | ||||||
| Target Milestone: | 1.8.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| See Also: |
https://git.eclipse.org/r/127949 https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=f076708dd7720feef10573d570a9e3890f7bb70d |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Brian Peacock
Created attachment 191521 [details]
Here is a patch to do what is described in the bugzilla
I'm not convinced we need this. It doubles the time to report an error if the main dump file is corrupt. I haven't heard of a problem with people creating a text file of the same base name as the dump. The MAT notes view creates a file called dumpname.notes.txt which doesn't cause problems. DTFJ 1.5 won't read 1.4.2 javacore dumps, but that is unlikely to cause a problem as by default the heap dump and java dumps are named heapdump*.phd and javacore*.txt, so MAT will not pass both dumps to DTFJ. The PHD reader silently ignores the associated javacore it cannot read. I think this is all down to how people work. I have a number of directories that each contain a number of dumps. A single directory will contain everything concerned with a particular issue that I am working on. Let's assume I have 3 heapdumps in the directory. I want to keep a few notes on each dump reminding my what I was doing when each dump was created. The 3 heapdumps are called: heapdump.20110211.135004.3802.0002.phd heapdump.20110218.122113.5445.0002.phd heapdump.20110311.152435.7882.0002.phd Cleverly, MAT names all it's indices so they have the same basic naming convention and so to list all the files associated with the first heapdump once MAT has run I would type: ls heapdump.20110211.135004.3802.0002.* (Yes, I'm using Linux, but just replace ls with dir if you're a Windows person) Thus, if I was writing some information about the first dump I've got in the habit of giving the file an extension of .txt (probably back from the old DOS days, although lots of editors used to default to .txt for text files) and thus to make sure I can get all the information along with this extra information using the same ls command I would create a file called: heapdump.20110211.135004.3802.0002.txt ... and thus the problem occurs. ... and I have had this problem a couple of times already hence I wrote this fix. Personally, I think the extra time required to fail is negligible and thus the downside is very small. New Gerrit change created: https://git.eclipse.org/r/127949 Gerrit change https://git.eclipse.org/r/127949 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=f076708dd7720feef10573d570a9e3890f7bb70d Okay, I'll fix this. For the record, I've not use the supplied patch, but implemented it myself. |