JoshCheek / seeing_is_believing

Displays the results of every line of code in your file
1.31k stars 54 forks source link

error when using seeing_is_believing in vim #56

Closed crokobit closed 8 years ago

crokobit commented 9 years ago

Do not know why it happened? Any hint about why it happened or how to solve it?

Thanks a lot.

/Users/crokobit/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0/json-1.8.2/json/ext/parser.bundle: [BUG] Segmentation fault at 0x00000000000440 ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]

-- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details.

-- Control frame information ----------------------------------------------- c:0027 p:-17542969831314 s:0123 e:000122 TOP [FINISH] c:0026 p:---- s:0121 e:000120 CFUNC :require c:0025 p:0170 s:0117 e:000116 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0024 p:0009 s:0107 e:000106 CLASS /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:13 c:0023 p:0011 s:0105 e:000104 CLASS /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:12 c:0022 p:0056 s:0103 e:000102 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:9 [FINISH] c:0021 p:---- s:0101 e:000100 CFUNC :require c:0020 p:0170 s:0097 e:000096 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0019 p:0019 s:0087 e:000086 CLASS /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json.rb:58 c:0018 p:0017 s:0085 e:000084 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json.rb:54 [FINISH] c:0017 p:---- s:0083 e:000082 CFUNC :require c:0016 p:0170 s:0079 e:000078 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0015 p:0007 s:0069 e:000068 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:14 [FINISH] c:0014 p:---- s:0067 e:000066 CFUNC :require c:0013 p:0170 s:0063 e:000062 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0012 p:0055 s:0053 e:000052 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing.rb:8 [FINISH] c:0011 p:---- s:0051 e:000050 CFUNC :require c:0010 p:0170 s:0047 e:000046 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0009 p:0007 s:0037 e:000036 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing/binary.rb:1 [FINISH] c:0008 p:---- s:0035 e:000034 CFUNC :require c:0007 p:0170 s:0031 e:000030 METHOD /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69 c:0006 p:0027 s:0021 e:000020 TOP /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/bin/seeing_is_believing:5 [FINISH] c:0005 p:---- s:0019 e:000018 CFUNC :load c:0004 p:0135 s:0015 E:000ae0 EVAL /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/seeing_is_believing:23 [FINISH] c:0003 p:---- s:0011 e:000010 CFUNC :eval c:0002 p:0118 s:0005 E:002328 EVAL /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15 [FINISH] c:0001 p:0000 s:0002 E:0006e0 TOP [FINISH]

-- Ruby level backtrace information ---------------------------------------- /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in <main>' /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:ineval' /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/seeing_is_believing:23:in <main>' /Users/crokobit/.rvm/gems/ruby-2.2.0/bin/seeing_is_believing:23:inload' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/bin/seeing_is_believing:5:in <top (required)>' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing/binary.rb:1:in<top (required)>' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing.rb:8:in <top (required)>' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:14:in<top (required)>' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json.rb:54:in <top (required)>' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json.rb:58:inmodule:JSON' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:9:in <top (required)>' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:12:inmodule:JSON' /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/json-1.8.2/lib/json/ext.rb:13:in <module:Ext>' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:inrequire' /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'

-- Machine register context ------------------------------------------------ rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000025 rbp: 0x00007fff5e9f75a0 rsp: 0x00007fff5e9f74f0 r8: 0x0000000000000000 r9: 0x00007fff7d8d9300 r10: 0x00000000000057b8 r11: 0x00007fff90bb9160 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000001 r15: 0x0000000000000025 rip: 0x00000001015fec8a rfl: 0x0000000000010206

-- C level backtrace information ------------------------------------------- 0 libruby.2.2.0.dylib 0x0000000101354924 rb_print_backtrace + 29 1 libruby.2.2.0.dylib 0x0000000101354a1d rb_vm_bugreport + 142 2 libruby.2.2.0.dylib 0x000000010124011a rb_bug_context + 210 3 libruby.2.2.0.dylib 0x00000001012ebf60 check_reservedsignal + 0 4 libsystem_platform.dylib 0x00007fff93c87f1a _sigtramp + 26 5 libruby.2.2.0.dylib 0x00000001015fec8a newobj_of + 42 6 libdyld.dylib 0x00007fff7d8f2110 _ZL12sGlobalMutex + 24

-- Other runtime information -----------------------------------------------

[NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. Don't forget to include the above Crash Report log file. For details: http://www.ruby-lang.org/bugreport.html

crokobit commented 9 years ago

It had no error after I uninstall json gem, do not know why... QQ

crokobit commented 9 years ago

uninstall json gem will solve error above, but it comes another error when I run code below in vim with hwartig/vim-seeing-is-believing:

require 'roo' s = Roo::Excelx.new("XXX.xlsx")

error:

It blew up >.< Please log an issue at: https://github.com/JoshCheek/seeing_is_believing/issues SeeingIsBelieving::VERSION "2.2.0" Parser::VERSION "2.2.0.3" RUBY_VERSION "2.2.0" ENV['RUBY_VERSION'] "ruby-2.2.0" Also include the source code of program that caused this behaviour.

p.s. It works fine in irb.

JoshCheek commented 9 years ago

Try running this against the latest release (as of right now: gem install seeing_is_believing -v 3.0.0.beta.5) I suspect the issue is fixed there, due to https://github.com/JoshCheek/seeing_is_believing/issues/46 Its possible that Roo::Excelx has the same flaw (raises an exception whose message has characters that are invalid, given the encoding).

As an aside, you may have issues with your Ruby install. Looks like it's installed to /usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0. I know that Homebrew installs things to /usr/local/Cellar, so I'd assume that this Ruby is installed with Homebrew. But the gem is from /Users/crokobit/.rvm/gems/ruby-2.2.0/gems/seeing_is_believing-2.2.0, which is clearly an rvm location. Then again, maybe rvm installs gems globally to /usr/local/Cellar, but that'd be strange IMO.

JoshCheek commented 9 years ago

It's probably that, the JSON gem has a C extension, where it's easy to fuck up the encoding, and the Roo gem is working with binary data, which it could include in an inspection on an error message (eg shows the binary data to help you understand why it couldn't parse the file).

crokobit commented 9 years ago

Thanks~