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

SEGFAULT related to tabline and resize.

Expand Messages
  • Groleo Marius
    Hi. If this was already fixed, I apologise. The actions performed are: In vim, do :tabnew as many times needed to go beyond the closing X. Then, close some
    Message 1 of 5 , Feb 28, 2006
      Hi.
      If this was already fixed, I apologise.
      The actions performed are:
      In vim, do :tabnew as many times needed to go beyond the closing X.
      Then, close some tabs, using the X.
      Doing a terminal resize will cause vim to crash.
      Its reproductible under linux(console vim) and windows(gui).



      :version
      VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 27, compiled Mar 1 2006 21:15:23)
      Compiled by groleo@darkstar
      Normal 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 +cryptv -cscope +cursorshape
      +dialog_con_gui +diff +digraphs +dnd -ebcdic -emacs_tags
      +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path
      +folding -footer +fork() +gettext -hangul_input +iconv
      +insert_expand +jumplist -keymap -langmap +libcall +linebreak
      +lispindent +listcmds +localmap +menu +mksession +modify_fname
      +mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm
      +mouse_xterm +multi_byte +multi_lang -mzscheme
      +netbeans_intg -osfiletype +path_extra -perl +postscript +printer
      -profile -python +quickfix -rightleft -ruby +scrollbind
      +signs +smartindent -sniff +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
      -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.
      0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include
      -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
      -I/usr/include/freetype2 -I/u
      sr/include/freetype2/config -I/usr/include/glib-2.0
      -I/usr/lib/glib-2.0/include -g -O2 -I/usr/X11R6/include
      Linking: gcc -L/usr/X11R6/lib -L/usr/local/lib -o vim
      -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxf
      t-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0
      -lgmodule-2.0 -lglib-2.0 -lXt -lncurses -lgpm


      (gdb) bt
      #0 0x405b8d81 in kill () from /lib/libc.so.6
      #1 0x08111e11 in may_core_dump () at os_unix.c:2880
      #2 0x08111d14 in mch_exit (r=3948) at os_unix.c:2845
      #3 0x080e3822 in preserve_exit () at misc1.c:7999
      #4 0x081102ba in deathtrap (sigarg=135879454) at os_unix.c:974
      #5 <signal handler called>
      #6 0x405f16cd in free () from /lib/libc.so.6
      #7 0x0816bab6 in win_free_lsize (wp=0x406a4ff4) at window.c:3995
      #8 0x0812c0e9 in screenalloc (clear=0) at screen.c:6889
      #9 0x0812c869 in screenclear () at screen.c:7127
      #10 0x0815f7d8 in set_shellsize (width=0, height=0, mustset=0) at term.c:3112
      #11 0x0815f6d1 in shell_resized () at term.c:3041
      #12 0x0810feb5 in mch_inchar (buf=0x81ed494 "", maxlen=75, wtime=-1,
      tb_change_cnt=1052) at os_unix.c:361
      #13 0x081624df in ui_inchar (buf=0x81ed494 "", maxlen=75, wtime=-1,
      tb_change_cnt=1052) at ui.c:189
      #14 0x080b9cc2 in inchar (buf=0x81ed494 "", maxlen=227, wait_time=-1,
      tb_change_cnt=1052) at getchar.c:2798
      #15 0x080b91cf in vgetorpeek (advance=1) at getchar.c:2584
      #16 0x080b8474 in vgetc () at getchar.c:1488
      #17 0x080b88bb in safe_vgetc () at getchar.c:1673
      #18 0x080f0d4e in normal_cmd (oap=0xbffff3a0, toplevel=1) at normal.c:621
      #19 0x080c393e in main_loop (cmdwin=0, noexmode=0) at main.c:1116
      #20 0x080c352d in main (argc=0, argv=0x0) at main.c:906

      #7 0x0816bab6 in win_free_lsize (wp=0x406a4ff4) at window.c:3995
      3995 vim_free(wp->w_lines);
      (gdb) p wp->w_lines
      $5 = (wline_T *) 0x0



      --
      Regards, Groleo!

      # Use "Reply to All" on mailing lists.
      # touch universe
      # chmod +x universe
      # ./universe
    • Bram Moolenaar
      ... I can t reproduce it... I do recall changing the loop over win_alloc_lines(), but that was more than two days ago. If you look in the code of
      Message 2 of 5 , Mar 1, 2006
        Groleo Marius wrote:

        > If this was already fixed, I apologise.
        > The actions performed are:
        > In vim, do :tabnew as many times needed to go beyond the closing X.
        > Then, close some tabs, using the X.
        > Doing a terminal resize will cause vim to crash.
        > Its reproductible under linux(console vim) and windows(gui).

        I can't reproduce it... I do recall changing the loop over
        win_alloc_lines(), but that was more than two days ago. If you look in
        the code of screenalloc(), it should say FOR_ALL_TAB_WINDOWS() above
        win_free_lines() and win_alloc_lines(). If it is FOR_ALL_WINDOWS() then
        you are using an older version.

        If the latest version still has this problem, then please give a
        step-by-step reproducable example.

        --
        hundred-and-one symptoms of being an internet addict:
        20. When looking at a pageful of someone else's links, you notice all of them
        are already highlighted in purple.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://www.ICCF.nl ///
      • Groleo Marius
        I just built the latest CVS checkout, and the bug is still reproductible. At line 6887, in screen.c I have #ifdef FEAT_WINDOWS FOR_ALL_TAB_WINDOWS(tp, wp)
        Message 3 of 5 , Mar 1, 2006
          I just built the latest CVS checkout, and the bug is still reproductible.

          At line 6887, in screen.c I have
          #ifdef FEAT_WINDOWS
          FOR_ALL_TAB_WINDOWS(tp, wp)
          win_free_lsize(wp);
          #else
          win_free_lsize(curwin);
          #endif

          The core comes from the attempt to free a NULL pointer
          (gdb) p wp->w_lines
          $5 = (wline_T *) 0x0

          The steps I follow are
          :tabnew, so the tabline becomes visible.
          doubleclick an active tab to create new tabs, until they go beyond the closing X
          now, try to resize the window in which Vim is started.
          You might need to try to resize it a couple of times.




          --
          Regards, Groleo!

          # Use "Reply to All" on mailing lists.
          # touch universe
          # chmod +x universe
          # ./universe
        • A. J. Mechelynck
          ... I think I have seen it in W32, but only after setting tabline to empty (either manually with my usual vimrc, or implicitly with gvim -N -u NONE ).
          Message 4 of 5 , Mar 1, 2006
            Groleo Marius wrote:
            > I just built the latest CVS checkout, and the bug is still reproductible.
            >
            > At line 6887, in screen.c I have
            > #ifdef FEAT_WINDOWS
            > FOR_ALL_TAB_WINDOWS(tp, wp)
            > win_free_lsize(wp);
            > #else
            > win_free_lsize(curwin);
            > #endif
            >
            > The core comes from the attempt to free a NULL pointer
            > (gdb) p wp->w_lines
            > $5 = (wline_T *) 0x0
            >
            > The steps I follow are
            > :tabnew, so the tabline becomes visible.
            > doubleclick an active tab to create new tabs, until they go beyond the closing X
            > now, try to resize the window in which Vim is started.
            > You might need to try to resize it a couple of times.
            >
            >
            >
            >
            > --
            > Regards, Groleo!
            >
            > # Use "Reply to All" on mailing lists.
            > # touch universe
            > # chmod +x universe
            > # ./universe
            >
            >
            >

            I think I have seen it in W32, but only after setting 'tabline' to empty
            (either manually with my usual vimrc, or implicitly with "gvim -N -u
            NONE"). Downsizing gvim quickly, reducing 'columns' with the mouse to as
            little as it will take, causes gvim to exit. DrWatson does not come up.
            In my vimrc I have an autocommand starting ":au VimLeave * nested if
            v:dying |"... and I believe that it was not triggered.

            With my usual 'tabline' setting, individual tabs don't shrink; if there
            are too many of them they overflow out the left side of the tab line.
            This altered behaviour may explain why in this case Vim doesn't
            disappear in this case.


            Best regards,
            Tony.
          • Bram Moolenaar
            ... OK, I managed to reproduce the problem with the help of the efence library. The tabline was made too long, writing past the number of columns. I have
            Message 5 of 5 , Mar 1, 2006
              Groleo Marius wrote:

              > I just built the latest CVS checkout, and the bug is still reproductible.
              >
              > At line 6887, in screen.c I have
              > #ifdef FEAT_WINDOWS
              > FOR_ALL_TAB_WINDOWS(tp, wp)
              > =09win_free_lsize(wp);
              > #else
              > win_free_lsize(curwin);
              > #endif
              >
              > The core comes from the attempt to free a NULL pointer
              > (gdb) p wp->w_lines
              > $5 =3D (wline_T *) 0x0
              >
              > The steps I follow are
              > :tabnew, so the tabline becomes visible.
              > doubleclick an active tab to create new tabs, until they go beyond the clos=
              > ing X
              > now, try to resize the window in which Vim is started.
              > You might need to try to resize it a couple of times.

              OK, I managed to reproduce the problem with the help of the efence
              library. The tabline was made too long, writing past the number of
              columns. I have fixed it.

              --
              hundred-and-one symptoms of being an internet addict:
              25. You believe nothing looks sexier than a man in boxer shorts illuminated
              only by a 17" inch svga monitor.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ download, build and distribute -- http://www.A-A-P.org ///
              \\\ help me help AIDS victims -- http://www.ICCF.nl ///
            Your message has been successfully submitted and would be delivered to recipients shortly.