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

MacVim hangs when alert sound should be played

Expand Messages
  • Colin Sullivan
    Hello, Every time an OS X beep warning sound should be played, my MacVim buffer hangs for a few seconds before becoming responsive again, and no sound is
    Message 1 of 4 , Jun 2, 2012
    • 0 Attachment
      Hello,

      Every time an OS X "beep" warning sound should be played, my MacVim buffer hangs for a few seconds before becoming responsive again, and no sound is played.

      It is reproducible when

      - Pressing the escape key when in normal mode
      - Navigating to the top or bottom of a file and attempting to navigate past the beginning or end of it.
      - Renaming ~/.vimrc, ~/.gvimrc, and ~/.vim
      - Using a guest account on my mac which has the default vim/MacVim configuration
      - After deleting MacVim preferences

      Here is how I realized it was supposed to be playing a sound:

      (gdb) bt
      #0 0x00007fff8e12767a in mach_msg_trap ()
      #1 0x00007fff8e126d71 in mach_msg ()
      #2 0x00007fff84cf04e9 in SSClient_AudioServicesSetActionDataMessageAsync ()
      #3 0x00007fff84cefef0 in ActionDataToServer ()
      #4 0x00007fff84cef908 in CreateBuiltInInfo ()
      #5 0x00007fff84cef46b in PlaySound ()
      #6 0x00007fff854c1c42 in NSBeep ()
      #7 0x00000001080f5265 in gui_write ()
      #8 0x00000001080dcb00 in ui_write ()
      #9 0x000000010809d34a in update_single_line ()
      #10 0x0000000108116017 in main_loop ()
      #11 0x000000010811a172 in main ()

      that backtrace is reproducible when binding to MacVim with gdb everytime it is hanging.

      Macbook Pro 15" running OS X 10.7.3

      MacVim installed with:

      sudo port install MacVim +huge +python32 +cscope

      mvim --version
      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 2 2012 21:00:21)
      MacOS X (unix) version
      Included patches: 1-244, 246-390
      Compiled by colin@...
      Huge version with MacVim 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() +fullscreen
      +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 +mouse_urxvt +multi_byte
      +multi_lang -mzscheme +netbeans_intg +odbeditor +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 +transparency
      +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
      +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp
      -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: "/opt/local/MacVim.app/Contents/Resources/vim"
      Compilation: /usr/bin/llvm-gcc-4.2 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -pipe -O2 -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
      Linking: /usr/bin/llvm-gcc-4.2 -L/opt/local/lib -arch x86_64 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -lintl -framework Cocoa -L/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m -lpython3.2 -lintl -framework CoreFoundation

      Let me know if you'd like any other info, or if there is something else I should try.

      --
      You received this message from the "vim_mac" 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
    • Colin Sullivan
      I also can reproduce this with filesystem autocomplete in command mode, i.e. ... exhibits the same halting behavior. This one has a slightly different
      Message 2 of 4 , Jun 3, 2012
      • 0 Attachment
        I also can reproduce this with filesystem autocomplete in command mode, i.e.

        :e ~/.vi<tab>

        exhibits the same halting behavior. This one has a slightly different backtrace:

        (gdb) bt
        #0 0x00007fff8e12767a in mach_msg_trap ()
        #1 0x00007fff8e126d71 in mach_msg ()
        #2 0x00007fff84cf04e9 in SSClient_AudioServicesSetActionDataMessageAsync ()
        #3 0x00007fff84cefef0 in ActionDataToServer ()
        #4 0x00007fff84cef908 in CreateBuiltInInfo ()
        #5 0x00007fff84cef46b in PlaySound ()
        #6 0x00007fff854c1c42 in NSBeep ()
        #7 0x000000010eb63265 in gui_write ()
        #8 0x000000010eb4ab00 in ui_write ()
        #9 0x000000010ea7bba2 in inchar ()
        #10 0x000000010ea7d421 in vgetorpeek ()
        #11 0x000000010ea7e819 in vgetc ()
        #12 0x000000010ea7ecd9 in safe_vgetc ()
        #13 0x000000010ea5e675 in getcmdline ()
        #14 0x000000010ea561d8 in do_cmdline ()
        #15 0x000000010eabdb75 in nv_colon ()
        #16 0x000000010eac8d90 in normal_cmd ()
        #17 0x000000010eb840e0 in main_loop ()
        #18 0x000000010eb88172 in main ()


        On Saturday, June 2, 2012 10:28:22 PM UTC-7, Colin Sullivan wrote:
        > Hello,
        >
        > Every time an OS X "beep" warning sound should be played, my MacVim buffer hangs for a few seconds before becoming responsive again, and no sound is played.
        >
        > It is reproducible when
        >
        > - Pressing the escape key when in normal mode
        > - Navigating to the top or bottom of a file and attempting to navigate past the beginning or end of it.
        > - Renaming ~/.vimrc, ~/.gvimrc, and ~/.vim
        > - Using a guest account on my mac which has the default vim/MacVim configuration
        > - After deleting MacVim preferences
        >
        > Here is how I realized it was supposed to be playing a sound:
        >
        > (gdb) bt
        > #0 0x00007fff8e12767a in mach_msg_trap ()
        > #1 0x00007fff8e126d71 in mach_msg ()
        > #2 0x00007fff84cf04e9 in SSClient_AudioServicesSetActionDataMessageAsync ()
        > #3 0x00007fff84cefef0 in ActionDataToServer ()
        > #4 0x00007fff84cef908 in CreateBuiltInInfo ()
        > #5 0x00007fff84cef46b in PlaySound ()
        > #6 0x00007fff854c1c42 in NSBeep ()
        > #7 0x00000001080f5265 in gui_write ()
        > #8 0x00000001080dcb00 in ui_write ()
        > #9 0x000000010809d34a in update_single_line ()
        > #10 0x0000000108116017 in main_loop ()
        > #11 0x000000010811a172 in main ()
        >
        > that backtrace is reproducible when binding to MacVim with gdb everytime it is hanging.
        >
        > Macbook Pro 15" running OS X 10.7.3
        >
        > MacVim installed with:
        >
        > sudo port install MacVim +huge +python32 +cscope
        >
        > mvim --version
        > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 2 2012 21:00:21)
        > MacOS X (unix) version
        > Included patches: 1-244, 246-390
        > Compiled by colin@...
        > Huge version with MacVim 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() +fullscreen
        > +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 +mouse_urxvt +multi_byte
        > +multi_lang -mzscheme +netbeans_intg +odbeditor +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 +transparency
        > +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
        > +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp
        > -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: "/opt/local/MacVim.app/Contents/Resources/vim"
        > Compilation: /usr/bin/llvm-gcc-4.2 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -pipe -O2 -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
        > Linking: /usr/bin/llvm-gcc-4.2 -L/opt/local/lib -arch x86_64 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -lintl -framework Cocoa -L/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m -lpython3.2 -lintl -framework CoreFoundation
        >
        > Let me know if you'd like any other info, or if there is something else I should try.

        --
        You received this message from the "vim_mac" 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
      • björn
        ... I have not had this problem, nor can I reproduce it. It should be easy to work around however by disabling the bell, e.g. ... You may also be able to
        Message 3 of 4 , Jun 3, 2012
        • 0 Attachment
          On Sun, Jun 3, 2012 at 7:28 AM, Colin Sullivan wrote:
          >
          > Every time an OS X "beep" warning sound should be played, my MacVim buffer hangs for a few seconds before becoming responsive again, and no sound is played.
          >
          > It is reproducible when
          >
          > - Pressing the escape key when in normal mode
          > - Navigating to the top or bottom of a file and attempting to navigate past the beginning or end of it.
          > - Renaming ~/.vimrc, ~/.gvimrc, and ~/.vim
          > - Using a guest account on my mac which has the default vim/MacVim configuration
          > - After deleting MacVim preferences

          I have not had this problem, nor can I reproduce it. It should be
          easy to work around however by disabling the bell, e.g.

          :set vb t_vb=

          You may also be able to patch the problem by calling
          'gui_macvim_force_flush()' after 'NSBeep()' inside the definition of
          'gui_mch_beep()' (in src/MacVim/gui_macvim.m). (Let me know how it
          goes if you try.)

          Björn

          --
          You received this message from the "vim_mac" 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
        • Colin Sullivan
          I restarted my mac last night, and this morning I could not reproduce the issue. Strange. I do a lot of audio work, and am constantly changing my audio
          Message 4 of 4 , Jun 3, 2012
          • 0 Attachment
            I restarted my mac last night, and this morning I could not reproduce the issue.  Strange.  I do a lot of audio work, and am constantly changing my audio configuration, setting up soundflower, etc.

            I have disabled the bell anyway because I don't want it.

            Thanks for the help.
            ----------
            Colin Sullivan



            On Sun, Jun 3, 2012 at 8:01 AM, björn <bjorn.winckler@...> wrote:
            On Sun, Jun 3, 2012 at 7:28 AM, Colin Sullivan wrote:
            >
            > Every time an OS X "beep" warning sound should be played, my MacVim buffer hangs for a few seconds before becoming responsive again, and no sound is played.
            >
            > It is reproducible when
            >
            > - Pressing the escape key when in normal mode
            > - Navigating to the top or bottom of a file and attempting to navigate past the beginning or end of it.
            > - Renaming ~/.vimrc, ~/.gvimrc, and ~/.vim
            > - Using a guest account on my mac which has the default vim/MacVim configuration
            > - After deleting MacVim preferences

            I have not had this problem, nor can I reproduce it.  It should be
            easy to work around however by disabling the bell, e.g.

            :set vb t_vb=

            You may also be able to patch the problem by calling
            'gui_macvim_force_flush()' after 'NSBeep()' inside the definition of
            'gui_mch_beep()' (in src/MacVim/gui_macvim.m).  (Let me know how it
            goes if you try.)

            Björn

            --
            You received this message from the "vim_mac" 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

            --
            You received this message from the "vim_mac" 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.