Unknown problem with ZLib::Inflate
----------------------------------
Key: JRUBY-1424
URL: http://jira.codehaus.org/browse/JRUBY-1424
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x
Environment: java 1.5.0_07 (Apple Computer, Inc.)
macos 10.4.10
Reporter: Travis Tilley
Attachments: rubyzip-test_extract-data
The rubyzip ZipFileExtract.test_extract test fails with a stack trace on JRuby
1.0.1 and trunk (oct12, 2007).
The Exception is:
Exception in thread "main" java.util.zip.DataFormatException: unknown
compression method
The compression method should be:
compression method is ZipEntry::DEFLATED
To reproduce:
Zlib::Inflate.inflate(File.new('rubyzip-test_extract-data').read)
Full rubyzip test output and trace:
in test_extract before ZipFile.open(5entry_copy.zip)
before zf.extract(data/generated/longBinary.bin, extEntry)
in ZipInputStream.open_entry, before ZipEntry.read_local_entry
compression method is ZipEntry::DEFLATED
in Zip::Inflater.initialize
inputStream class: File
inputStream: #<File:5entry_copy.zip>
in ZipInputStream.sysread
numberOfBytes = 32768
buf = ""
buf class = String
decompressor class = Zip::Inflater
before Zip::Inflater.sysread(numberOfBytes, buf)
in Inflater.sysread
before while loop
before internal_produce_input(buf)
@zlibInflater class: Zlib::Inflate
@zlibInflater: #<Zlib::Inflate:0x68632b>
@inputStream class: File
@inputStream: #<File:5entry_copy.zip>
buf class: String
Decompressor::CHUNK_SIZE -> 32768
before data = @inputStream.read(Decompressor::CHUNK_SIZE, buf)
writing the contents of data to file 'rubyzip-test_extract-data'
before @zlibInflater.inflate(data)
Exception in thread "main" java.util.zip.DataFormatException: unknown
compression method
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Inflater.java:215)
at java.util.zip.Inflater.inflate(Inflater.java:232)
at org.jruby.util.ZlibInflate.inflate(ZlibInflate.java:95)
at org.jruby.RubyZlib$Inflate.inflate(RubyZlib.java:402)
at org.jruby.RubyZlib$InflateInvoker$inflate_method_1_0.call(Unknown
Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1412)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:351)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:996)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at
org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:2050)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:553)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.whileNode(ASTInterpreter.java:1656)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:388)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.dAsgnNode(ASTInterpreter.java:759)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:228)
at
org.jruby.evaluator.ASTInterpreter.whileNode(ASTInterpreter.java:1652)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:388)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:235)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1712)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at
org.jruby.evaluator.ASTInterpreter.returnNode(ASTInterpreter.java:1484)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:355)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:968)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:248)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:235)
at org.jruby.runtime.Block.yield(Block.java:200)
at org.jruby.RubyFile.open(RubyFile.java:898)
at org.jruby.RubyFile.open(RubyFile.java:871)
at org.jruby.RubyFileInvoker$open_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at ziptest.closure101(ziptest.rb:1396)
at ziptestBlockclosure101xx1.call(Unknown Source)
at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:100)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1712)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:968)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:248)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at ziptest.test_extract__124(ziptest.rb:1393)
at ziptestInvokertest_extract__124Fixed0.call(Unknown Source)
at org.jruby.RubyObject.send(RubyObject.java:1414)
at org.jruby.RubyObjectInvoker$send_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at
run3968502_9725752.__rescue_1(/Users/travis/jruby-1.1/lib/ruby/1.8/test/unit/testcase.rb:72)
at
run3968502_9725752.__ensure_1(/Users/travis/jruby-1.1/lib/ruby/1.8/test/unit/testcase.rb:71)
at
run3968502_9725752.__file__(/Users/travis/jruby-1.1/lib/ruby/1.8/test/unit/testcase.rb:71)
at
run3968502_9725752.run(/Users/travis/jruby-1.1/lib/ruby/1.8/test/unit/testcase.rb)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:112)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:235)
at org.jruby.runtime.Block.yield(Block.java:200)
at org.jruby.RubyArray.each(RubyArray.java:1172)
at org.jruby.RubyArrayInvoker$each_method_0_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:235)
at org.jruby.runtime.Block.yield(Block.java:200)
at org.jruby.RubyArray.each(RubyArray.java:1172)
at org.jruby.RubyArrayInvoker$each_method_0_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at
org.jruby.evaluator.ASTInterpreter.returnNode(ASTInterpreter.java:1484)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:355)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:80)
at
org.jruby.evaluator.ASTInterpreter.vcallNode(ASTInterpreter.java:1643)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:383)
at
org.jruby.evaluator.ASTInterpreter.returnNode(ASTInterpreter.java:1484)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:355)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at
org.jruby.evaluator.ASTInterpreter.returnNode(ASTInterpreter.java:1484)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:355)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:552)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at
org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:2050)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:991)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:235)
at org.jruby.runtime.Block.call(Block.java:188)
at org.jruby.RubyProc.call(RubyProc.java:197)
at org.jruby.RubyProc.call(RubyProc.java:171)
at org.jruby.Ruby.tearDown(Ruby.java:1882)
at org.jruby.Main.runInterpreter(Main.java:225)
at org.jruby.Main.runInterpreter(Main.java:179)
at org.jruby.Main.run(Main.java:121)
at org.jruby.Main.main(Main.java:96)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email