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

Re: vim v7.3.125 crashes when running a macro with a count in the thousands

Expand Messages
  • Dominique Pellé
    ... Hi Things worth trying for debugging: - put a breakpoint in x_error_handler(...) in vim/src/os_unix.c. That s the function which prints Vim: Got X error .
    Message 1 of 8 , Mar 31, 2011
    • 0 Attachment
      Mun wrote:

      > Hi,
      >
      > My OS: Red Hat Enterprise Linux 5.6
      > My configure command:
      >   configure --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-gui
      >
      > I must apologize that I don't have too much to go on with this issue,
      > but I'll provide what I have and I will try to get more data if requested.
      >
      > I had a simple macro that would take a line and reformat it by adding
      > strings to the beginning and ending of the line.  Nothing tricky or
      > complex.
      >
      > The file I was operating on had roughly 11,000 lines.  If I executed the
      > macro with a count of about 2,000 vim crashes on me.
      >
      > When I use the following vim command:
      > % vim --noplugin <filename>
      >
      > I get the following lines outut to the terminal when vim crashes:
      >
      > ------------------------------ Delimiter BEGIN --------------------------------
      >
      > BadRequest (invalid request code or no such operation)
      > Vim: Got X error
      > Vim: preserving files...
      > Vim: Finished.
      > 44;0MBadRequest (invalid request code or no such operation)
      > Vim: Got X error
      > Vim: Finished.
      > 44;0M
      > ------------------------------- Delimiter END ---------------------------------

      Hi

      Things worth trying for debugging:

      - put a breakpoint in x_error_handler(...) in vim/src/os_unix.c.
      That's the function which prints "Vim: Got X error". And
      send the stack trace when it gets there. Alternatively,
      you can put an abort() in that function. Vim will dump
      core when the function is called and with gdb you can
      look at the stack and variables.

      - try running with valgrind memory checker. It will run much
      slower but it may catch something:
      $ valgrind vim --log-file=valgrind.log
      For more details, see: http://dominique.pelle.free.fr/valgrind.txt.html

      In both cases, compile Vim with "CFLAGS = -g -O0" and
      make sure Vim is not stripped. You can comment this
      line in src/Makefile:

      $(STRIP) $(DEST_BIN)/$(VIMTARGET)

      Regards
      -- Dominique

      --
      You received this message from the "vim_dev" 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
    • Tony Mechelynck
      ... or, use the Vim executable produced by the compile (in src/ in your build directory tree), which is not stripped, rather than the output of make install
      Message 2 of 8 , Apr 1, 2011
      • 0 Attachment
        On 01/04/11 07:12, Dominique Pellé wrote:
        > Mun wrote:
        >
        >> Hi,
        >>
        >> My OS: Red Hat Enterprise Linux 5.6
        >> My configure command:
        >> configure --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-gui
        >>
        >> I must apologize that I don't have too much to go on with this issue,
        >> but I'll provide what I have and I will try to get more data if requested.
        >>
        >> I had a simple macro that would take a line and reformat it by adding
        >> strings to the beginning and ending of the line. Nothing tricky or
        >> complex.
        >>
        >> The file I was operating on had roughly 11,000 lines. If I executed the
        >> macro with a count of about 2,000 vim crashes on me.
        >>
        >> When I use the following vim command:
        >> % vim --noplugin<filename>
        >>
        >> I get the following lines outut to the terminal when vim crashes:
        >>
        >> ------------------------------ Delimiter BEGIN --------------------------------
        >>
        >> BadRequest (invalid request code or no such operation)
        >> Vim: Got X error
        >> Vim: preserving files...
        >> Vim: Finished.
        >> 44;0MBadRequest (invalid request code or no such operation)
        >> Vim: Got X error
        >> Vim: Finished.
        >> 44;0M
        >> ------------------------------- Delimiter END ---------------------------------
        >
        > Hi
        >
        > Things worth trying for debugging:
        >
        > - put a breakpoint in x_error_handler(...) in vim/src/os_unix.c.
        > That's the function which prints "Vim: Got X error". And
        > send the stack trace when it gets there. Alternatively,
        > you can put an abort() in that function. Vim will dump
        > core when the function is called and with gdb you can
        > look at the stack and variables.
        >
        > - try running with valgrind memory checker. It will run much
        > slower but it may catch something:
        > $ valgrind vim --log-file=valgrind.log
        > For more details, see: http://dominique.pelle.free.fr/valgrind.txt.html
        >
        > In both cases, compile Vim with "CFLAGS = -g -O0" and
        > make sure Vim is not stripped. You can comment this
        > line in src/Makefile:
        >
        > $(STRIP) $(DEST_BIN)/$(VIMTARGET)

        or, use the Vim executable produced by the compile (in src/ in your
        build directory tree), which is not stripped, rather than the output of
        "make install" (usually in /usr/local/bin/), which is.


        Best regards,
        Tony.
        --
        It is said that the lonely eagle flies to the mountain peaks while the
        lowly ant crawls the ground, but cannot the soul of the ant soar as
        high as the eagle?


        >
        > Regards
        > -- Dominique
        >

        --
        You received this message from the "vim_dev" 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
      • Mun
        Hi, On Thu, Mar 31, 2011 at 10:12 PM PDT, Dominique Pellé wrote: DP Mun wrote: DP DP Hi, DP DP My OS: Red Hat Enterprise Linux 5.6 DP My
        Message 3 of 8 , Apr 2, 2011
        • 0 Attachment
          Hi,

          On Thu, Mar 31, 2011 at 10:12 PM PDT, Dominique Pellé wrote:
          DP> Mun wrote:
          DP>
          DP> > Hi,
          DP> >
          DP> > My OS: Red Hat Enterprise Linux 5.6
          DP> > My configure command:
          DP> >   configure --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-gui
          DP> >
          DP> > I must apologize that I don't have too much to go on with this issue,
          DP> > but I'll provide what I have and I will try to get more data if requested.
          DP> >
          DP> > I had a simple macro that would take a line and reformat it by adding
          DP> > strings to the beginning and ending of the line.  Nothing tricky or
          DP> > complex.
          DP> >
          DP> > The file I was operating on had roughly 11,000 lines.  If I executed the
          DP> > macro with a count of about 2,000 vim crashes on me.
          DP> >
          DP> > When I use the following vim command:
          DP> > % vim --noplugin <filename>
          DP> >
          DP> > I get the following lines outut to the terminal when vim crashes:
          DP> >
          DP> > ------------------------------ Delimiter BEGIN --------------------------------
          DP> >
          DP> > BadRequest (invalid request code or no such operation)
          DP> > Vim: Got X error
          DP> > Vim: preserving files...
          DP> > Vim: Finished.
          DP> > 44;0MBadRequest (invalid request code or no such operation)
          DP> > Vim: Got X error
          DP> > Vim: Finished.
          DP> > 44;0M
          DP> > ------------------------------- Delimiter END ---------------------------------
          DP>
          DP> Hi
          DP>
          DP> Things worth trying for debugging:
          DP>
          DP> - put a breakpoint in x_error_handler(...) in vim/src/os_unix.c.
          DP> That's the function which prints "Vim: Got X error". And
          DP> send the stack trace when it gets there. Alternatively,
          DP> you can put an abort() in that function. Vim will dump
          DP> core when the function is called and with gdb you can
          DP> look at the stack and variables.
          DP>
          DP> - try running with valgrind memory checker. It will run much
          DP> slower but it may catch something:
          DP> $ valgrind vim --log-file=valgrind.log
          DP> For more details, see: http://dominique.pelle.free.fr/valgrind.txt.html
          DP>
          DP> In both cases, compile Vim with "CFLAGS = -g -O0" and
          DP> make sure Vim is not stripped. You can comment this
          DP> line in src/Makefile:
          DP>
          DP> $(STRIP) $(DEST_BIN)/$(VIMTARGET)

          I used the valgrind method to acquire some additional information.
          After my first run crashed I noticed that every valgrind error seemed to
          reference Python (I hit the valgrind limit of 100 errors during the
          run).

          So I recompiled vim without the Python code. But again vim crashed
          during my experiment, but this time with only two valgrind errors (see
          attachment for the log file).

          My *guess* would be that the errors are related to XOpenDisplay and/or
          gtk in some way. But I'm at a loss here.

          Thanks in advance.

          Regards,

          --
          Mun

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