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

37391Re: VIM-Crash after "Hit Enter ...": logged with verbose=20

Expand Messages
  • Benji Fisher
    Jul 31, 2004
      On Sun, Aug 01, 2004 at 12:59:17AM +0000, Suresh Govindachar wrote:
      > Hello,
      >
      > Attached is a "verbose=20" log of a VIM crash.
      >
      > 1) BACKGROUND: WHAT THE USER SEES:
      >
      > When user responds with <Enter> to the message:
      >
      > Hit Enter or type command to continue
      >
      > VIM crashes -- Microsoft says
      > "Illegal operation and will be shut down ..."

      What version of Microsoft are you using?

      > 2) ABOUT THE COMMAND ISSUED BY THE USER:
      >
      > The user issued the command:
      > :perl tms_w_do_this('d');
      >
      > In essence, the subroutine tms_w_do_this looks like:
      >
      > sub tms_w_do_this
      > {
      > <code>
      >
      > VIM::DoCommand("echoerr 'Watch-out for an unscheduled VIM-CRASH!!!'"):
      > return 1;
      > }

      I do not think "in essence" is enough for me to even try
      reproducing the bug. Have you tried removing the body of the subroutine
      except for the VIM::DoCommand line (and the return line)? Can you give
      instructions, for someone who does not normally use Perl, on how to
      define the subroutine and make it visible to vim?

      > The user does see the line: "Watch-out for an unscheduled
      > VIM-CRASH!!!" just above the "Hit Enter or type command to
      > continue" message.
      >
      > 3) THE VERBOSE=20 LOG WAS MADE BY ISSUING:
      >
      > the command :silent call BugRecorder() where:
      >
      > function! BugRecoreder()
      >
      > echo "about to begin ..."
      > set nomore
      > :redir! >> fooey
      > echo "BEGIN"
      > set verbose=20
      > perl tms_w_do_this('d');
      > echo "DONE"
      > set verbose=0
      > echo "done again"
      > :redir END
      > set more
      > echo "all done!"
      >
      > endfunction
      >
      > 4) THE CRASH ALSO HAPPENS WHEN THE SUBROUTINE
      > is invoked with the mapping (all in one line):
      >
      > nmap <buffer> <LocalLeader>d :perl VIM::Msg("Watch out for a VIM CRASH!:".tms_w_do_this('d').",");<CR>
      >
      > The message "Watch out for a VIM CRASH!:1," (the
      > 1 is the return value of the subroutine) shows
      > up as expected above the "Hit Enter or ..." message.
      >
      > 5) The crash does not happen always. It
      > happens about in 1 out of 2 to 3 calls.
      >
      > I have been working on this all day, and
      > can't think of anything else to do.
      >
      > By the way: When I set verbose to 20 and call
      > the subroutine by hand (instead of calling with
      > the wrapper function), there seems to be much
      > more messages than what has been captured in the
      > log file. Does it just seem like there are more
      > messages, or does the wrapper function miss some
      > messages?
      >
      > I hope this can be fixed without me having to
      > make a debug build of VIM.
      >
      > Thanks,
      >
      > --Suresh

      I will try to edit out some parts of the log that seem harmless to
      me. Also, I will remove some "blank" lines.

      > ______________________________________________
      > BEGIN
      > line 7: perl tms_w_do_this('d');
      > line 7: let b:tms_fooey = fnamemodify('d:\tms\tms\inbox\index.idx', ':p')
      > line 7: let b:tms_fooey = fnamemodify('d:\tms\tms\inbox\ViMozilla.eml', ':p')
      > line 7: let b:tms_fooey = fnamemodify('d:\tms\tms\inbox\index.idx', ':p')
      > line 7: drop d:\tms\tms\inbox\index.idx

      That seems a little round-about, and it must have come from all the
      <code> that you suppressed. Ditto for the following lines, which seem
      to involve entering and exiting some buffers and windows.

      > Executing WinEnter Auto commands for "*"
      > autocommand if !exists("w:sortdirection") | call s:EditDir() | endif
      [harmless]
      > function <SNR>52_EditDir returning #0
      > continuing in WinEnter Auto commands for "*"
      > line 0: endif
      >
      > Executing BufEnter Auto commands for "*"
      > autocommand call s:EditDir()
      [still harmless]
      > function <SNR>52_EditDir returning #0
      >
      > continuing in BufEnter Auto commands for "*"

      Back to the mysterious <code> in tms_w_do_this(), it seems:

      > line 7: normal gg
      > line 7: / ViMozilla.eml\s*$
      > line 7: nohls
      > line 7: let b:tms_fooey = fnamemodify('d:\tms\tms\inbox\ViMozilla.eml', ':p')
      > line 7: drop d:\tms\tms\inbox\index.idx
      > line 7: update
      > "d:\tms\tms\inbox\index.idx" 5L, 1147C written
      > line 7: silent! bw! d:\tms\tms\inbox\ViMozilla.eml

      I might remove the silent! for debugging purposes.

      > Executing BufUnload Auto commands for "*"
      > autocommand call s:CVSVimDiffRestore(expand("<abuf>"))
      [looks harmless, but have you tried removing this plugin?]
      > function <SNR>28_CVSVimDiffRestore returning #0
      >
      > continuing in BufUnload Auto commands for "*"
      >
      > Executing BufDelete Auto commands for "*"
      > autocommand call <SID>BMRemove()
      > line 0: call <SID>BMRemove()
      > calling function <SNR>10_BMRemove()
      [looks harmless]
      > function <SNR>10_BMRemove returning #0
      >
      > continuing in BufDelete Auto commands for "*"

      Back to the mysterious <code> in tms_w_do_this(), it seems:

      > line 7: let foo = delete("d:/tms/tms/inbox/ViMozilla.eml")
      > line 7: echoerr 'DONE: this line is needed to help catch a bug'
      > Error detected while processing function BugRecoreder:
      > line 7:
      > DONE: this line is needed to help catch a bug
      > line 7: echohl None
      > line 7: echoerr 'Watch-out for an unscheduled VIM-CRASH!!!'
      > Watch-out for an unscheduled VIM-CRASH!!!
      > line 7: echohl None

      Well, that line is done, and we move on to the end of the
      BugRecoreder() function:

      > line 8: echo "DONE"
      > DONE
      > line 9: set verbose=0
      > done again

      HTH --Benji Fisher
    • Show all 11 messages in this topic