Loading ...
Sorry, an error occurred while loading the content.
 

file that hangs vim

Expand Messages
  • Mark Huiskes
    Hi guys, opening the attached file hangs vim. This fragment used to be part of a larger file. That one hangs only when this fragment gets into view. Am
    Message 1 of 2 , Oct 2, 2010
      Hi guys,
      opening the attached file hangs vim. This fragment used to be part of a
      larger file. That one hangs only when this fragment gets into view. Am
      guessing it's syntax related. Happens in several versions, also latest:

      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 2 2010 19:22:04)
      Included patches: 1-19
      Compiled by Mark Huiskes<Mark.Huiskes@...>
      Huge version with GTK2 GUI. Features included (+) or not (-):
      +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
      +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
      +comments
      +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
      +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
      +file_in_path +find_in_path +float +folding -footer +fork() +gettext
      -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall
      +linebreak +lispindent +listcmds +localmap -lua +menu +mksession
      +modify_fname
      +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm
      -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme
      +netbeans_intg
      -osfiletype +path_extra -perl +persistent_undo +postscript +printer +profile
      +python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs
      +smartindent -sniff +startuptime +statusline -sun_workshop +syntax
      +tag_binary
      +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects
      +title
      +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
      +viminfo
      +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim
      +xsmp_interact +xterm_clipboard -xterm_save system
      vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/local/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -D_REEN
      TRANT -I/usr/local/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/
      usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include
      /gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/includ
      e/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpn
      g12 -O2 -fno-strength-reduce -Wall -D_FORTIFY_SOURCE=1
      Linking: gcc -L/usr/local/lib -o vim -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -l
      atk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpan
      go-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -l
      glib-2.0 -lXt -lncurses -L/usr/lib/python2.6/config -lpython2.6 -lutil -lm -Xl
      inker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

      Regards,
      Mark.

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Christian Brabandt
      Hi Mark! ... Yes, this is syntax related. A simple way to reproduce: ~$ cat hang.vim
      Message 2 of 2 , Oct 4, 2010
        Hi Mark!

        On Sa, 02 Okt 2010, Mark Huiskes wrote:

        > function! SipmapRuler( type )
        > let line = line(".") - 1
        >
        > if a:type == 1
        > call append( line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$" )
        > if !exists("g:sipmap_1ruler")
        > call append( line, "INFO -----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I%$" )
        > endif
        > else
        > call append( line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78....84....90....96...102...108...114...120...126...132%$" )
        > if !exists("g:sipmap_1ruler")
        > call append( line, "INFO -----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I-----I%$" )
        > endif
        > endif
        > endfunction

        Yes, this is syntax related. A simple way to reproduce:
        ~$ cat > hang.vim <<EOF
        call append(1,'...........................................................')
        EOF
        ~$ vim -u NONE -N -I NONE -c 'syntax on' hang.vim

        gdb backtrace:

        (gdb) bt
        #0 0x08113bb9 in vim_strchr (string=0xa09b514 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.", c=39) at misc2.c:1867
        #1 0x0815ed2f in cstrchr (s=0xa09b514 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.", c=39) at regexp.c:6684
        #2 0x0815e340 in regrepeat (p=0xa09b511 "\025", maxcount=2147418112) at regexp.c:5784
        #3 0x0815cb3c in regmatch (scan=0xa09b50e "\b") at regexp.c:4879
        #4 0x0815a6ce in regtry (prog=0xa09b4a0, col=15) at regexp.c:3712
        #5 0x0815a4df in vim_regexec_both (line=0x9ffc5c3 "call append(1,'", '.' <repeats 59 times>, "')", col=15, tm=0x0) at regexp.c:3601
        #6 0x08159fd9 in vim_regexec_multi (rmp=0xbfcc3040, win=0x9fd16d0, buf=0x9fd26b0, lnum=1, col=11, tm=0x0) at regexp.c:3410
        #7 0x0819b861 in syn_regexec (rmp=0xbfcc3040, lnum=1, col=11) at syntax.c:3223
        #8 0x08199b13 in syn_current_attr (syncing=0, displaying=1, can_spell=0x0, keep_state=0) at syntax.c:2058
        #9 0x08199523 in get_syntax_attr (col=11, can_spell=0x0, keep_state=0) at syntax.c:1817
        #10 0x0816659b in win_line (wp=0x9fd16d0, lnum=1, startrow=0, endrow=43, nochange=1) at screen.c:4074
        #11 0x081624b3 in win_update (wp=0x9fd16d0) at screen.c:1850
        #12 0x081603de in update_screen (type=40) at screen.c:531
        #13 0x080e541f in main_loop (cmdwin=0, noexmode=0) at main.c:1165
        #14 0x080e5071 in main (argc=9, argv=0xbfcc3864) at main.c:965


        Don't understand enough of the syntax and RE-code of vim to see what goes wrong.

        regards,
        Christian

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.