Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fixing the crash on shutdown introduced in #910 by changing the command that gets run on on deleteOnExit Files.delete() -> Files.deleteIfExists() this will prevent the jvm from crashing on shutdown if the temporary files get cleaned up before it closes * This still leaves open the possibilty of crash on shutdown if the temporary file is unable to be removed for some other reason. That's subtly different than the File version of deleteOnExit, but it may be useful to get these error messages in the unusual case of failing to delete a file that exists. * fixes #1029
- Loading branch information
eb364a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am working on a Mac and getting this error when I try to run "java -Xmx1024m -jar /Users/Shared/tools/picard/build/libs/picard.jar SortSam I=JLCN434.clean.bam O=JLCN434.picsort.bam SO=coordinate":
Exception in thread "Thread-30" htsjdk.samtools.util.RuntimeIOException: java.nio.file.NoSuchFileException: /var/folders/j6/jnlyr3zn265_9pn975ft55800000gp/T/kathiemihindukulasuriya/sortingcollection.4038297370218058636.tmp
at htsjdk.samtools.util.IOUtil$DeletePathThread.run(IOUtil.java:374)
Caused by: java.nio.file.NoSuchFileException: /var/folders/j6/jnlyr3zn265_9pn975ft55800000gp/T/kathiemihindukulasuriya/sortingcollection.4038297370218058636.tmp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at htsjdk.samtools.util.IOUtil$DeletePathThread.run(IOUtil.java:372)
While I see the fix you posted, I cannot find the IOUtil.java file to implement the fix. Can you please give me some advice?
Thank you,
Kathie
eb364a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KathieM, the fix was made in htsjdk, but it seems like hasn't been incorporated into picard yet. Someone in that project will have to update it. I opened a pull request to update there just now , so it should happen soon broadinstitute/picard#1007
eb364a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.