htsjdk.samtools.util.RuntimeIOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 576#211673393
    via GitHub by akiezun
    ,
  • FULL PRODUCT VERSION : java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) ADDITIONAL OS VERSION INFORMATION : Windows 7 Linux dev-linux-1 2.6.18-308.13.1.el5 #1 SMP Thu Jul 26 05:45:09 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : The code reads the contents of a cab archive which uses MSZIP compression. This is a sequence of blocks, where each block has a header and then a set of bytes compressed with normal zip compression. Those bytes should be readable with java.util.zip.Inflater, and in 1.6 this works, but in 1.7, on the second block it gives the following error: java.util.zip.DataFormatException: invalid distance too far back at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:259) at CabTestCase$MSZipInputStream.read(CabTestCase.java:86) REGRESSION. Last worked in version 6u45 ADDITIONAL REGRESSION INFORMATION: java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Take any text file larger than 32K. Use the Windows makecab utility (included with Windows 7) to create a cab archive from it as follows: Put the following lines into a file called caboptions, replacing "bigfile.txt" with the name of your text file (don't include the dashes): -- -- -- .OPTION EXPLICIT .Set CabinetNameTemplate=test.cab .Set Cabinet=on .Set Compress=on bigfile.txt -- -- -- Run this command: makecab /f options ** EDIT - I've uploaded a test cab file which reproduces the issue also. e.g : C:\jdk8\bin\java CabTestCase test.cab blah <same exception as below seen> Compile the code provided below and pass the resulting test.cab file as the first argument, any name for the output file as the second argument. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The original (uncompressed) text file should be copied into the output file. ACTUAL - Exception in thread "main" java.io.IOException: java.util.zip.DataFormatException: invalid distance too far back at CabTestCase$MSZipInputStream.read(CabTestCase.java:103) at java.io.FilterInputStream.read(FilterInputStream.java:133) at CabTestCase$CountingInputStream.read(CabTestCase.java:881) at CabTestCase$EntryStreamWrapper.read(CabTestCase.java:803) at CabTestCase$EntryStreamWrapper.read(CabTestCase.java:807) at CabTestCase.main(CabTestCase.java:37) Caused by: java.util.zip.DataFormatException: invalid distance too far back at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:259) at CabTestCase$MSZipInputStream.read(CabTestCase.java:86) ... 5 more REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- <See attachment CabTestCase.java> ---------- END SOURCE ----------
    via by Webbug Group,
  • SAM tools / Mailing Lists
    via by Unknown author,
  • PDFBox 2.0.4 : XFA to text error
    via Stack Overflow by Mayank
    ,
    • htsjdk.samtools.util.RuntimeIOException: java.util.zip.DataFormatException: invalid distance too far back at htsjdk.samtools.util.BlockGunzipper.unzipBlock(BlockGunzipper.java:112) at htsjdk.samtools.util.BlockCompressedInputStream.inflateBlock(BlockCompressedInputStream.java:402) at htsjdk.samtools.util.BlockCompressedInputStream.readBlock(BlockCompressedInputStream.java:384) at htsjdk.samtools.util.BlockCompressedInputStream.available(BlockCompressedInputStream.java:127) at htsjdk.samtools.util.BlockCompressedInputStream.read(BlockCompressedInputStream.java:252) at java.io.DataInputStream.read(DataInputStream.java:149) at htsjdk.samtools.util.BinaryCodec.readBytesOrFewer(BinaryCodec.java:404) at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:380) at htsjdk.samtools.util.BinaryCodec.readByteBuffer(BinaryCodec.java:490) at htsjdk.samtools.util.BinaryCodec.readInt(BinaryCodec.java:501) at htsjdk.samtools.BAMRecordCodec.decode(BAMRecordCodec.java:177) at htsjdk.samtools.BAMFileReader$BAMFileIterator.getNextRecord(BAMFileReader.java:661) at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:635) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:629) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:599) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:545) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:519) at org.broadinstitute.sv.util.gatk.SVBaseReadWalker.simulateTraversal(SVBaseReadWalker.java:231) at org.broadinstitute.sv.util.gatk.SVBaseReadWalker.onTraversalDone(SVBaseReadWalker.java:202) at org.broadinstitute.sv.metadata.isize.ComputeInsertSizeHistogramsWalker.onTraversalDone(ComputeInsertSizeHistogramsWalker.java:59) at org.broadinstitute.sv.metadata.isize.ComputeInsertSizeHistogramsWalker.onTraversalDone(ComputeInsertSizeHistogramsWalker.java:30) at org.broadinstitute.gatk.engine.executive.Accumulator$StandardAccumulator.finishTraversal(Accumulator.java:129) at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:116) at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:315) at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:121) at org.broadinstitute.sv.main.SVCommandLine.execute(SVCommandLine.java:133) at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:248) at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:155) at org.broadinstitute.sv.main.SVCommandLine.main(SVCommandLine.java:87) at org.broadinstitute.sv.main.SVCommandLine.main(SVCommandLine.java:63) Caused by: java.util.zip.DataFormatException: invalid distance too far back at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:259) at htsjdk.samtools.util.BlockGunzipper.unzipBlock(BlockGunzipper.java:96) ... 29 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor3 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    9 more bugmates