Closed gyrodave closed 7 years ago
You seem to be using a pretty old ksv - that's 0.5. Which versions of ksc and KS ruby runtime do you use - i.e. please check something like that:
$ ksc --version
kaitai-struct-compiler 0.7
$ ruby -rkaitai/struct/struct -e 'puts Kaitai::Struct::VERSION'
0.7
Thanks for the quite reply !
Looks like I'm all on 0.7
$ ksc --version
kaitai-struct-compiler 0.7
$ ruby -rkaitai/struct/struct -e 'puts Kaitai::Struct::VERSION'
0.7
Here is the full error :
ksv test.gif gif.ksy
/types/header/seq/1/encoding: unknown key found, expected: consume, contents, doc, doc-ref, eos-error, id, if, include, parent, process, repeat, size, size-eos, terminator, type
Compilation OK
/home/dave/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': no implicit conversion of nil into String (TypeError)
from /home/dave/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/dave/.rvm/gems/ruby-2.4.0/gems/kaitai-struct-visualizer-0.5/lib/kaitai/struct/visualizer/visualizer_main.rb:31:in `block in compile_format'
from /home/dave/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tmpdir.rb:89:in `mktmpdir'
from /home/dave/.rvm/gems/ruby-2.4.0/gems/kaitai-struct-visualizer-0.5/lib/kaitai/struct/visualizer/visualizer_main.rb:10:in `compile_format'
from /home/dave/.rvm/gems/ruby-2.4.0/gems/kaitai-struct-visualizer-0.5/lib/kaitai/struct/visualizer/visualizer.rb:18:in `initialize'
from /home/dave/.rvm/gems/ruby-2.4.0/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in `new'
from /home/dave/.rvm/gems/ruby-2.4.0/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in `<top (required)>'
from /home/dave/.rvm/gems/ruby-2.4.0/bin/ksv:22:in `load'
from /home/dave/.rvm/gems/ruby-2.4.0/bin/ksv:22:in `<main>'
from /home/dave/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
from /home/dave/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
There are 2 problems here:
/types/header/seq/1/encoding
:/types/header/seq/1/encoding: unknown key found, expected: consume, contents, doc, doc-ref, eos-error, id, if, include, parent, process, repeat, size, size-eos, terminator, type
This was indeed a problem with gif.ksy (which went ok with older compiler, but modern ksc revealed a bogus combination of keys). I've updated it, please update your gif.ksy as well.
git clone https://github.com/kaitai-io/kaitai_struct_visualizer
cd kaitai_struct_visualizer
gem build kaitai-struct-visualizer.gemspec
gem install kaitai-struct-visualizer-0.7.gem
Gif.ksy that was faulty in the context of version 0.7.
It is working fine now !
Can't get the visualizer to start. Tried several versions of ruby, no success... Here is the console output :