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

vim crash + possible bug fix

Expand Messages
  • raichoo@...
    Hi, I m experiencing a reproducible crash in vim when using nerdtree. I start vim, open a file with nerdtree, hide the tree with nerdtreetoggle and open a
    Message 1 of 3 , Jul 2, 2013
      Hi,

      I'm experiencing a reproducible crash in vim when using nerdtree.

      I start vim, open a file with nerdtree, hide the tree with nerdtreetoggle and
      open a split window. This leads to either an infinite loop or a crash in this
      portion of window.c:4080

      for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
      if (wp == win)
      return tp;

      vim still uses the nerdtree window as the firstwin even though it has been
      removed. I'm currently using this workaround:

      --- a/src/window.c Mon Jul 01 22:03:04 2013 +0200
      +++ b/src/window.c Tue Jul 02 12:19:14 2013 +0200
      @@ -4651,15 +4651,18 @@
      {
      if (wp->w_prev != NULL)
      wp->w_prev->w_next = wp->w_next;
      - else if (tp == NULL)
      + else if (tp == NULL) {
      firstwin = wp->w_next;
      + curtab->tp_firstwin = firstwin;
      + }
      else
      tp->tp_firstwin = wp->w_next;
      if (wp->w_next != NULL)
      wp->w_next->w_prev = wp->w_prev;
      - else if (tp == NULL)
      + else if (tp == NULL) {
      lastwin = wp->w_prev;
      - else
      + curtab->tp_lastwin = lastwin;
      + } else
      tp->tp_lastwin = wp->w_prev;
      }

      I hope that is information is useful.

      Kind regards,
      raichoo

      --
      --
      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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... Thanks. However, it s known that tp_firstwin is invalid for the current tab page. Instead of trying to make it valid, the loop you quote above should be
      Message 2 of 3 , Jul 3, 2013
        Raichoo wrote:

        > I'm experiencing a reproducible crash in vim when using nerdtree.
        >
        > I start vim, open a file with nerdtree, hide the tree with nerdtreetoggle and
        > open a split window. This leads to either an infinite loop or a crash in this
        > portion of window.c:4080
        >
        > for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
        > if (wp == win)
        > return tp;
        >
        > vim still uses the nerdtree window as the firstwin even though it has been
        > removed. I'm currently using this workaround:

        Thanks. However, it's known that tp_firstwin is invalid for the current
        tab page. Instead of trying to make it valid, the loop you quote above
        should be changed. I'll make a patch for that, please verify it solves
        the problem.


        --
        Proofread carefully to see if you any words out.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        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

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • raichoo
        Seems to work over here. At least it didn t show up anymore when I tried to reproduce it. :) Kind regards, raichoo ... -- -- You received this message from the
        Message 3 of 3 , Jul 3, 2013
          Seems to work over here. At least it didn't show up anymore when
          I tried to reproduce it. :)

          Kind regards,
          raichoo


          On Wed, Jul 3, 2013 at 2:02 PM, Bram Moolenaar <Bram@...> wrote:

          Raichoo wrote:

          > I'm experiencing a reproducible crash in vim when using nerdtree.
          >
          > I start vim, open a file with nerdtree, hide the tree with nerdtreetoggle and
          > open a split window. This leads to either an infinite loop or a crash in this
          > portion of window.c:4080
          >
          >       for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
          >           if (wp == win)
          >               return tp;
          >
          > vim still uses the nerdtree window as the firstwin even though it has been
          > removed. I'm currently using this workaround:

          Thanks.  However, it's known that tp_firstwin is invalid for the current
          tab page.  Instead of trying to make it valid, the loop you quote above
          should be changed.  I'll make a patch for that, please verify it solves
          the problem.


          --
          Proofread carefully to see if you any words out.

           /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
          ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\  an exciting new programming language -- http://www.Zimbu.org        ///
           \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

          --
          --
          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
           
          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
           
           
        Your message has been successfully submitted and would be delivered to recipients shortly.