Performaing a trace reading causes a crash #1

Closed
postmodern opened this Issue Jul 7, 2012 · 5 comments

Comments

Projects
None yet
2 participants
Contributor

postmodern commented Jul 7, 2012

Was attempting to inspect bloxorz.swf with furnace-swf -i player_rt.swf -t

obj.header.signature => "CWS"
obj.header.version => 10
obj.header.file_length => 124983
obj.stream.frame_size.num_bits => 15
obj.stream.frame_size.x_min => 0
obj.stream.frame_size.x_max => 11680
obj.stream.frame_size.y_min => 0
obj.stream.frame_size.y_max => 9360
obj.stream.frame_rate_lo => 0
obj.stream.frame_rate_hi => 30
obj.stream.frame_count => 1
obj.stream.tag_wrappers[0].type_and_length => 4420
obj.stream.tag_wrappers[1].type_and_length => 579
obj.stream.tag_wrappers[2].type_and_length => 1536
obj.stream.tag_wrappers[3].type_and_length => 5567
obj.stream.tag_wrappers[3].long_length => 11
obj.stream.tag_wrappers[4].type_and_length => 5631
obj.stream.tag_wrappers[4].long_length => 5261
/home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:200:in `[]': no implicit conversion from nil to integer (TypeError)
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:200:in `debug_name_of'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/base.rb:225:in `debug_name'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:201:in `debug_name_of'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/base.rb:225:in `debug_name'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/trace.rb:66:in `block in trace_value'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/trace.rb:42:in `trace_message'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/trace.rb:64:in `trace_value'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/base_primitive.rb:136:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `block in do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `each'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/lib/furnace-swf/swf/tag_wrapper.rb:51:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/array.rb:279:in `block in read_until_eof'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/array.rb:276:in `loop'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/array.rb:276:in `read_until_eof'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/array.rb:269:in `read_until'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/array.rb:241:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `block in do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `each'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/struct.rb:212:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/lib/furnace-swf/swf/file.rb:21:in `do_read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/base.rb:163:in `read'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/bin/furnace-swf:60:in `block (2 levels) in '
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/trace.rb:32:in `call'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/bindata-1.4.4/lib/bindata/trace.rb:32:in `trace_reading'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/bin/furnace-swf:59:in `block in '
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/bin/furnace-swf:55:in `open'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/gems/furnace-swf-0.0.2/bin/furnace-swf:55:in `'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/bin/furnace-swf:19:in `load'
    from /home/hal/.rvm/gems/ruby-1.9.3-p194/bin/furnace-swf:19:in `'
Owner

whitequark commented Jul 7, 2012

It's strange, but this works for me. I have bindata version 1.4.4, too.

Contributor

postmodern commented Jul 7, 2012

Odd, it works now. Are you using any Threads in furnace-swf?

Owner

whitequark commented Jul 7, 2012

Nope, it's single-threaded.

Contributor

postmodern commented Jul 7, 2012

Oops, my example was wrong. You want this player_rt.swf.

Owner

whitequark commented Jul 7, 2012

This was caused by incorrect interaction of TagWrapper (which duck-masquerades for a bindata struct) with tracing infrastructure.

@whitequark whitequark closed this Jul 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment