{"action":"created","issue":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/11","repository_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/11/comments","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/11/events","html_url":"https://github.com/kaitai-io/kaitai_struct_visualizer/issues/11","id":191532793,"number":11,"title":"[...]kaitai/struct/struct.rb:314:in `ensure_fixed_contents': wrong number of arguments (given 1, expected 2) (ArgumentError)","user":{"login":"tschoening","id":6223655,"avatar_url":"https://avatars.githubusercontent.com/u/6223655?v=3","gravatar_id":"","url":"https://api.github.com/users/tschoening","html_url":"https://github.com/tschoening","followers_url":"https://api.github.com/users/tschoening/followers","following_url":"https://api.github.com/users/tschoening/following{/other_user}","gists_url":"https://api.github.com/users/tschoening/gists{/gist_id}","starred_url":"https://api.github.com/users/tschoening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschoening/subscriptions","organizations_url":"https://api.github.com/users/tschoening/orgs","repos_url":"https://api.github.com/users/tschoening/repos","events_url":"https://api.github.com/users/tschoening/events{/privacy}","received_events_url":"https://api.github.com/users/tschoening/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-24T14:27:55Z","updated_at":"2016-11-24T14:36:58Z","closed_at":null,"body":"I tried the [zip KSY](https://github.com/kaitai-io/kaitai_struct_formats/blob/master/archive/zip.ksy) of your formats repo with some ordinary zip and got the following error:\r\n\r\n\tC:\\Users\\tschoening>ksv \"Desktop\\zip.zip\" \"Desktop\\zip.ksy\"\r\n\tCompilation OK\r\n\tClass loaded OK\r\n\tC:/Users/tschoening/.gem/ruby/2.3.0/gems/kaitai-struct-0.5/lib/kaitai/struct/struct.rb:314:in `ensure_fixed_contents': wrong number of arguments (given 1, expected 2) (ArgumentError)\r\n\t\t\tfrom C:/Users/tschoening/AppData/Local/Temp/d20161124-10844-nvzwha/zip.rb:167:in `_read'\r\n\t\t\tfrom C:/Users/tschoening/AppData/Local/Temp/d20161124-10844-nvzwha/zip.rb:39:in `_read'\r\n\t\t\tfrom C:/Users/tschoening/.gem/ruby/2.3.0/gems/kaitai-struct-visualizer-0.5/lib/kaitai/struct/visualizer/visualizer.rb:29:in `initialize'\r\n\t\t\tfrom C:/Users/tschoening/.gem/ruby/2.3.0/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in `new'\r\n\t\t\tfrom C:/Users/tschoening/.gem/ruby/2.3.0/gems/kaitai-struct-visualizer-0.5/bin/ksv:19:in `<top (required)>'\r\n\t\t\tfrom C:/Users/tschoening/.gem/ruby/2.3.0/bin/ksv:23:in `load'\r\n\t\t\tfrom C:/Users/tschoening/.gem/ruby/2.3.0/bin/ksv:23:in `<main>'\r\n\r\nI'm pretty sure the Zip itself is valid and I tried different ones as well, all with the same result.\r\n\r\nAdditionally:\r\n\r\nIs there some arg to tell `ksv` to not delete the temporarily compiled classes? If not, interested to add one?\r\n\r\nCurrently those temp folders seem to be deleted on program exit, which is fine in the default case of course. But in cases like these they might be of value for debugging. My main environment isn't Ruby, so I would need to do `things` to compile the classes again, which in theory are unnecessary because `ksv` did all those things already. I would just need to tell it to not remove the files and at least could have a first look myself."},"comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/comments/262790273","html_url":"https://github.com/kaitai-io/kaitai_struct_visualizer/issues/11#issuecomment-262790273","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_visualizer/issues/11","id":262790273,"user":{"login":"GreyCat","id":157154,"avatar_url":"https://avatars.githubusercontent.com/u/157154?v=3","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T14:36:57Z","updated_at":"2016-11-24T14:36:57Z","body":"> I'm pretty sure the Zip itself is valid and I tried different ones as well, all with the same result.\r\n\r\nAPI of `ensure_fixed_contents` has changed recently. If you use current compiler, then you're expected to keep all runtimes + visualizer up-to-date as well. Please update Ruby runtime as well. If you don't want to deal with building gems yourself, then probably just getting [this file](https://raw.githubusercontent.com/kaitai-io/kaitai_struct_ruby_runtime/master/lib/kaitai/struct/struct.rb) and replacing your `C:/Users/tschoening/.gem/ruby/2.3.0/gems/kaitai-struct-0.5/lib/kaitai/struct/struct.rb` should do the trick.\r\n\r\n> Is there some arg to tell ksv to not delete the temporarily compiled classes? If not, interested to add one?\r\n\r\nNot yet. Technically, you can always get the exactly same compiled class by running it `ksc -t ruby --debug original.ksy`. Of course, it's easy to implement some command-line option to just leave them be (or even compile them to current or some designated directory, for example, not to temp dir). I'll try to implement one, thanks for the idea :)"}}
{"actor":{"display_login":"GreyCat"}}