Closed evandrix closed 7 years ago
Judging from /eta: unknown key found
, you've got a key named eta
on the top level of the gif.ksy file, while it should be named meta
. Copy-paste error?
Hi, First time running this. What could be wrong in this situation? Would this due to incompatible with kaitai-struct runtime I have?
ksv ~/workspace2/temp/test.png ~/workspace2/kaitai_struct/formats/image/png.ksy
Compilation OK
Class loaded OK
/var/lib/gems/1.9.1/gems/kaitai-struct-0.5/lib/kaitai/struct/struct.rb:314:in ensure_fixed_contents': wrong number of arguments (1 for 2) (ArgumentError) from /tmp/d20161231-50149-wf4cb6/png.rb:29:in
_read'
from /var/lib/gems/1.9.1/gems/kaitai-struct-visualizer-0.5/lib/kaitai/struct/visualizer/visualizer.rb:29:in initialize' from /var/lib/gems/1.9.1/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in
new'
from /var/lib/gems/1.9.1/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in <top (required)>' from /usr/local/bin/ksv:23:in
load'
from /usr/local/bin/ksv:23:in `
Could be that kaitai_struct's commit c27986b404 broke binary compatibility. Wonder how to rebuild kaitai_struct_visualizer?
ah, sorry, I got it working now.
@thsieh123 Sorry for late reply %) Indeed, you've encountered incompatibility between 0.5 and upcoming 0.6 API. You need to either user 0.5 everywhere (i.e. both runtime and compiler), or current git (upcoming 0.6) everywhere (i.e. compile the compiler from git + use Ruby runtime from git). As far as I remember, visualizer itself had no major API changes between 0.5 and 0.6, so it's only a matter of ksc vs runtime.
Actually, this case gave a good idea that we probably need to add some sanity checks into generated code, to check the version of API.
@thsieh123 I've added this as an issue to main KS project: https://github.com/kaitai-io/kaitai_struct/issues/72
Thanks!
$ ksv 1194614.gif gif.ksy
error message