kaitai_struct_visualizer icon indicating copy to clipboard operation
kaitai_struct_visualizer copied to clipboard

KSC crashes immediately due to unknown option --

Open fridtjof opened this issue 7 years ago • 5 comments

The java command line does not accept -- as an option, stopping before even executing KSC.

Java version: Oracle JDK 1.8.0_152 OS: macOS 10.13.2

Things work again after commenting line 34 in kaitai_struct_visualizer/lib/kaitai/struct/visualizer/ksy_compiler.rb

I have not opened a PR for this yet, as I am not sure if this was recently changed or has always been like this

fridtjof avatar Dec 13 '17 12:12 fridtjof

Thanks! It seems that OS X get treated in the same way as Windows, then? Unfortunately, I can't check myself.

GreyCat avatar Dec 13 '17 13:12 GreyCat

I had the same bug on macOS and @fridtjof's fix worked for me.

cugu avatar Jan 07 '18 18:01 cugu

Same issue for me on macOS 10.12. @fridtjof's fix worked for me

osterwood avatar Mar 02 '18 15:03 osterwood

Turns out the homebrew formula installed its own launcher instead of ksc's launch wrapper. I submitted a PR to fix this, which should be merged soon: https://github.com/Homebrew/homebrew-core/pull/25967

fridtjof avatar Apr 01 '18 15:04 fridtjof

So here's a confusing thing:

The 0.8 homebrew formula always worked just fine with ksv for me, even though it wasn't using the official katai-struct-compiler launch script. But when I upgraded to the 0.8_1 formula today (containing the official launch script), ksv and ksdump both broke, with an obviously swallowed -d option. Apparently I'm backwards from the rest of the universe somehow. Go figure.

Rolling back to 0.8 was no problem, but no amount of brew switch-ing, brew upgrade-ing, or gem update-ing would get everything working correctly with 0.8_1. So in the spirit of DEAR PEOPLE FROM THE FUTURE, here's the "nuke it from orbit" approach that finally sorted it out for me:

brew update
brew uninstall --force kaitai-struct-compiler
rm /usr/local/bin/ksc
gem uninstall kaitai-struct-visualizer
gem uninstall kaitai-struct
brew install kaitai-struct-compiler
gem install kaitai-struct-visualizer

Say yes to removing ksv and ksdump when asked.

/usr/local/bin/ksc was a symlink to /usr/local/Cellar/kaitai-struct-compiler/0.8/bin/kaitai-struct-compiler that decided to hang around even after switching to 0.8_1 and uninstalling 0.8. Perhaps I made that symlink manually, but I don't know why I would. Deleting it didn't fix anything, but it certainly shouldn't exist, in any case.

tmillican avatar Jun 22 '18 01:06 tmillican