≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1741

Bug #1741: Works sometimes and then crashes

Kind bug
Product Command-T
When Created 2010-11-21T21:32:54Z, updated 2011-08-29T17:32:26Z
Status closed
Reporter anonymous
Tags no tags

Description

I can get it to work, it opens files etc. as expected, but then suddenly it can crash. It can be after opening 5-10 files, or at the first one.

Here's the tract:

/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:246: [BUG] gc_sweep(): unknown data type 0x0(0x8bf6564)
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]

-- control frame ----------
c:0011 p:0062 s:0043 b:0043 l:000042 d:000042 METHOD /home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:246
c:0010 p:0079 s:0036 b:0034 l:000024 d:000033 BLOCK  /home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:279
c:0009 p:---- s:0030 b:0030 l:000029 d:000029 FINISH
c:0008 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC  :each
c:0007 p:0189 s:0025 b:0025 l:000024 d:000024 METHOD /home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:274
c:0006 p:0039 s:0019 b:0019 l:000018 d:000018 METHOD /home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:161
c:0005 p:0051 s:0015 b:0014 l:000013 d:000013 METHOD /home/sirup/.vim/bundle/command-t/ruby/command-t/controller.rb:295
c:0004 p:0071 s:0010 b:0010 l:000009 d:000009 METHOD /home/sirup/.vim/bundle/command-t/ruby/command-t/controller.rb:76
c:0003 p:0010 s:0006 b:0006 l:0009b4 d:000005 EVAL   (eval):1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0009b4 d:0009b4 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
(eval):1:in `<main>'
/home/sirup/.vim/bundle/command-t/ruby/command-t/controller.rb:76:in `handle_key'
/home/sirup/.vim/bundle/command-t/ruby/command-t/controller.rb:295:in `list_matches'
/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:161:in `matches='
/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:274:in `print_matches'
/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:274:in `each'
/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:279:in `block in print_matches'
/home/sirup/.vim/bundle/command-t/ruby/command-t/match_window.rb:246:in `match_text_for_idx'

-- C level backtrace information -------------------------------------------
/usr/lib/libruby.so.1.9(rb_vm_bugreport+0x72) [0xb6cddfb2]
/usr/lib/libruby.so.1.9(+0x51b31) [0xb6bd3b31]
/usr/lib/libruby.so.1.9(rb_bug+0x3a) [0xb6bd413a]
/usr/lib/libruby.so.1.9(+0x68988) [0xb6bea988]
/usr/lib/libruby.so.1.9(rb_newobj+0x4f) [0xb6beae8f]
/usr/lib/libruby.so.1.9(rb_str_resurrect+0x2d) [0xb6c8a0dd]
/usr/lib/libruby.so.1.9(+0x14a1d2) [0xb6ccc1d2]
/usr/lib/libruby.so.1.9(+0x151033) [0xb6cd3033]
/usr/lib/libruby.so.1.9(+0x151cd4) [0xb6cd3cd4]
/usr/lib/libruby.so.1.9(rb_yield+0x56) [0xb6cd9ae6]
/usr/lib/libruby.so.1.9(+0xc6f79) [0xb6c48f79]
/usr/lib/libruby.so.1.9(+0x146f2d) [0xb6cc8f2d]
/usr/lib/libruby.so.1.9(+0x155c6a) [0xb6cd7c6a]
/usr/lib/libruby.so.1.9(+0x14ad34) [0xb6cccd34]
/usr/lib/libruby.so.1.9(+0x151033) [0xb6cd3033]
/usr/lib/libruby.so.1.9(+0x15142c) [0xb6cd342c]
/usr/lib/libruby.so.1.9(rb_eval_string+0x51) [0xb6cda9e1]
/usr/lib/libruby.so.1.9(rb_protect+0x140) [0xb6bd8740]
/usr/lib/libruby.so.1.9(rb_eval_string_protect+0x2e) [0xb6ccacfe]
gvim(ex_ruby+0x79) [0x81e9c29]
gvim(do_cmdline+0x1164) [0x80c48b4]
gvim() [0x809e407]
gvim() [0x809eb22]
gvim() [0x80a26ac]
gvim(ex_call+0x1dd) [0x80a549d]
gvim(do_cmdline+0x1164) [0x80c48b4]
gvim() [0x8135fb0]
gvim(normal_cmd+0x6fd) [0x813d77d]
gvim(main_loop+0x3a8) [0x80fbdd8]
gvim(main+0x1575) [0x80fdcb5]
/lib/libc.so.6(__libc_start_main+0xe6) [0xb6ecdc76]
gvim() [0x806fdb1]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Vim: Caught deadly signal ABRT
Vim: Finished.

Comments

  1. Greg Hurrell 2010-11-21T21:49:29Z

    Haven't seen this one before, but then, I have never tested against Ruby 1.9.2.

    So this is occurring at a fairly low level by the looks of it, in the garbage collector of the Ruby runtime itself.

    There are three possibilities that spring to mind here:

    • you may have discovered a bug in the Ruby interpreter, like the "NOTE" you pasted says; this seems unlikely, but Ruby 1.9.2 is very new so it is not outside the realm of possibility
    • you may have discovered a bug in Command-T; to be honest, this seems even less likely, as it has proven stable for some time on a range of different versions of Ruby
    • you might be running into trouble if the version of Ruby that is present on your system and which you used when you built Command-T is not identical the version of Ruby that was used when Vim was built

    So my advice to you would be to make sure that you aren't using mismatched versions of Ruby. Failing that, try a different version of Ruby to see if the problem is exclusive to 1.9.2.

    Here I'm using the stock standard Ruby that comes with my system, which happens to be 1.8.7, as I see no call for running a bleeding-edge Ruby interpreter in my editing environment, which is principally for getting work done and not playing with the latest shiny baubles.

  2. anonymous 2011-01-06T11:35:50Z

    I've been experiencing this (or a similar crash) for a while now, using Vim 7.3.50 and Ruby 1.87. After a few moments of using CommandT, Vim crashes with:

    ~/.vim/ruby/command-t/controller.rb:262: [BUG] gc_sweep(): unknown data type 0x18(0xb61bfa9c)
    ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
    
    Vim: Caught deadly signal ABRT
    Vim: Finished.

    The mentioned line/file/date type isn't actually authoritative, as it changes from crash to crash.

    That being said, I believe this to be related to internal changes in Vim: Downgrading to 7.2.442 fixes all problems. On a related note, another plugin also written in Ruby, "lusty juggler", does not work on 7.3 at all. It normally is used for switching buffers, but does not detect any buffers using Vim 7.3.

  3. Greg Hurrell 2011-01-06T11:45:16Z

    At a guess, the lusty juggler failure is most likely due to a known bug in the Ruby support in 7.3 where it always reports the current buffer number as zero. A workaround is possible; falling back to buffer name instead when the bug is present. The corresponding ticket for this issue in Command-T is ticket #1617. The bug's been reported upstream but as far as I know hasn't been dealt with yet.

    Not sure if the crashes might be due to related bugs in 7.3's Ruby support. I've been watching the vim_dev mailing list and there have been a few Ruby-related patches fixing various bugs, but I don't know if any of those might be relevant here.

  4. anonymous 2011-01-06T17:47:09Z

    I've been getting this since the 1.01 release. The second time I run Command T, Vim crashes with this error.

    Vim: Caught deadly signal SEGV                                  [11:45:07]
    Vim: Finished.
  5. Greg Hurrell 2011-01-06T18:30:47Z

    If you look at what was changed from 1.0 to 1.0.1, nothing was altered that would explain a crash.

    If you changed nothing else (ie. neither Vim nor the Ruby used when building either Vim or Command-T) then it is almost certainly a miscompilation. Have you tried blowing it away and re-building it? Have you tried going over the troubleshooting tips in the documentation which talk about checking/ensuring that you're using the exact same version of Ruby when building Command-T as was used when Vim was built?

  6. Greg Hurrell 2011-01-16T23:12:30Z

    Closed ticket #1767 as a duplicate of this one.

  7. Greg Hurrell 2011-01-16T23:21:36Z

    Just to keep things together, this forum thread may be referring to the same underlying issue.

  8. Greg Hurrell 2011-02-16T01:49:32Z

    Closed ticket #1781 as a duplicate of this one.

  9. Greg Hurrell 2011-02-16T01:51:52Z

    Seeing as all reported crashes have been due to incorrect compilation or bugs in Vim's Ruby support, going to mark this one as closed too.

  10. Greg Hurrell 2011-02-16T01:52:56Z

    Status changed:

    • From: new
    • To: closed
  11. buck 2011-08-27T00:32:21Z

    Wincent: Is there any upstream vim/ubuntu bug for this?

    If my issue is really caused by incorrect ruby integration, then I'd imagine other ruby plugins would be having issues as well.

  12. buck 2011-08-27T00:52:31Z

    FYI, here are the upstream bugs:

    Debian (fixed/closed) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614336 Ubuntu (unassigned) https://bugs.launchpad.net/ubuntu/+source/vim/+bug/738423?comments=all

  13. Greg Hurrell 2011-08-27T07:56:31Z

    I'm not sure if other Ruby plugins have issues, or only ones like Command-T that involve native C extensions (not many of those around).

  14. buck 2011-08-29T17:32:26Z

    Wincent: I may be mistaken, but I don't believe that the C extension is involved. I wish I could read the stack trace better. Are you able to glean any clues from it?

    Here's the change that fixed it, according to vim changelog. http://code.google.com/p/vim/source/detail?r=ee50cd1a3032

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets