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

Issue 230 in vim: "Vim: Caught deadly signal SEGV"

Expand Messages
  • vim@...
    Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 230 by amcn...@google.com: Vim: Caught deadly signal SEGV
    Message 1 of 16 , Jun 11, 2014
      Status: New
      Owner: ----
      Labels: Type-Defect Priority-Medium

      New issue 230 by amcn...@...: "Vim: Caught deadly signal SEGV"
      http://code.google.com/p/vim/issues/detail?id=230

      I have reduced my vimrc to a minimal example:

      set lines=27 columns=83
      set laststatus=2

      When I run gvim somefile.txt from an oversized terminal window (say,
      97x42), then it crashes with the error:

      Vim: Caught deadly signal SEGV

      Sometimes it crashes instantly, while other times, it takes a while. When
      the crash is not instant, I notice that the status bar isn't rendered.

      This crash occurs in both lxterminal and gnome-terminal.


      gvim --version gives:
      VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 30 2014 13:30:03)
      Included patches: 1-316
      Modified by pkg-vim-maintainers@...
      Compiled by spectral@...
      Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
      +acl +farsi +mouse_netterm +syntax
      +arabic +file_in_path +mouse_sgr +tag_binary
      +autocmd +find_in_path -mouse_sysmouse +tag_old_static
      +balloon_eval +float +mouse_urxvt -tag_any_white
      +browse +folding +mouse_xterm +tcl
      ++builtin_terms -footer +multi_byte +terminfo
      +byte_offset +fork() +multi_lang +termresponse
      +cindent +gettext -mzscheme +textobjects
      +clientserver -hangul_input +netbeans_intg +title
      +clipboard +iconv +path_extra +toolbar
      +cmdline_compl +insert_expand +perl +user_commands
      +cmdline_hist +jumplist +persistent_undo +vertsplit
      +cmdline_info +keymap +postscript +virtualedit
      +comments +langmap +printer +visual
      +conceal +libcall +profile +visualextra
      +cryptv +linebreak +python +viminfo
      +cscope +lispindent -python3 +vreplace
      +cursorbind +listcmds +quickfix +wildignore
      +cursorshape +localmap +reltime +wildmenu
      +dialog_con_gui +lua +rightleft +windows
      +diff +menu +ruby +writebackup
      +digraphs +mksession +scrollbind +X11
      +dnd +modify_fname +signs -xfontset
      -ebcdic +mouse +smartindent +xim
      +emacs_tags +mouseshape -sniff +xsmp_interact
      +eval +mouse_dec +startuptime +xterm_clipboard
      +ex_extra +mouse_gpm +statusline -xterm_save
      +extra_search -mouse_jsbterm -sun_workshop +xpm
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      2nd user gvimrc file: "~/.vim/gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread
      -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
      -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
      -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/
      -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
      -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
      -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0
      -I/usr/include/libart-2.0 -I/usr/include/gconf/2
      -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0
      -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0
      -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0
      -I/usr/include/gnome-vfs-2.0
      -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0
      -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0
      -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0
      -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0
      -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0
      -I/usr/include/freetype2 -I/usr/include/atk-1.0
      -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo
      -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1
      -I/usr/include/libpng12 -g -O2 -fstack-protector
      --param=ssp-buffer-size=4 -Wformat -Wformat-security
      -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
      -I/usr/include/tcl8.5 -D_REENTRANT=1 -D_THREAD_SAFE=1
      -D_LARGEFILE64_SOURCE=1
      Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic
      -Wl,-export-dynamic -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro
      -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0
      -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0
      -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lgnomeui-2 -lSM -lICE
      -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2
      -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0
      -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0
      -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0
      -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11
      -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl
      -L/usr/lib -llua5.1 -Wl,-E -fstack-protector -L/usr/local/lib
      -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm -lpthread -lcrypt
      -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker
      -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -L/usr/lib -ltcl8.5 -ldl
      -lpthread -lieee -lm -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib

      --
      You received this message because this project is configured to send all
      issue notifications to this address.
      You may adjust your notification preferences at:
      https://code.google.com/hosting/settings

      --
      --
      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/d/optout.
    • vim@...
      Comment #1 on issue 230 by brammool...@gmail.com: Vim: Caught deadly signal SEGV http://code.google.com/p/vim/issues/detail?id=230 I cannot reproduce it.
      Message 2 of 16 , Jun 11, 2014
        Comment #1 on issue 230 by brammool...@...: "Vim: Caught deadly
        signal SEGV"
        http://code.google.com/p/vim/issues/detail?id=230

        I cannot reproduce it. Would you be able to run Vim inside gdb or under
        valgrind, to find out where the crash happens?

        --
        You received this message because this project is configured to send all
        issue notifications to this address.
        You may adjust your notification preferences at:
        https://code.google.com/hosting/settings

        --
        --
        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/d/optout.
      • vim@...
        Comment #2 on issue 230 by amcn...@google.com: Vim: Caught deadly signal SEGV http://code.google.com/p/vim/issues/detail?id=230 Here is the output from
        Message 3 of 16 , Jun 11, 2014
          Comment #2 on issue 230 by amcn...@...: "Vim: Caught deadly signal
          SEGV"
          http://code.google.com/p/vim/issues/detail?id=230

          Here is the output from valgrind. The binary is stripped, so I hope it's
          not too useless.

          Attachments:
          valgrind.txt 29.2 KB

          --
          You received this message because this project is configured to send all
          issue notifications to this address.
          You may adjust your notification preferences at:
          https://code.google.com/hosting/settings

          --
          --
          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/d/optout.
        • vim@...
          Comment #3 on issue 230 by chrisbr...@googlemail.com: Vim: Caught deadly signal SEGV http://code.google.com/p/vim/issues/detail?id=230 I can sometimes
          Message 4 of 16 , Jun 11, 2014
            Comment #3 on issue 230 by chrisbr...@...: "Vim: Caught deadly
            signal SEGV"
            http://code.google.com/p/vim/issues/detail?id=230

            I can sometimes reproduce it. This patch fixes the crash for me:
            diff --git a/src/window.c b/src/window.c
            --- a/src/window.c
            +++ b/src/window.c
            @@ -4721,6 +4721,8 @@ win_alloc_lines(wp)
            win_free_lsize(wp)
            win_T *wp;
            {
            + if (wp == NULL)
            + return;
            vim_free(wp->w_lines);
            wp->w_lines = NULL;
            }

            There is however some other strange going on. Half of the times I run
            ./vim -N -g -f --noplugin -u /tmp/vimrc file.c
            the window opens fine, but Vim seems to get confused about the screensize.
            The last line is not drawn correctly. If I do :set number, it jumps from 26
            in the second last line to 32 in the last line.

            --
            You received this message because this project is configured to send all
            issue notifications to this address.
            You may adjust your notification preferences at:
            https://code.google.com/hosting/settings

            --
            --
            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/d/optout.
          • vim@...
            Comment #4 on issue 230 by brammool...@gmail.com: Vim: Caught deadly signal SEGV http://code.google.com/p/vim/issues/detail?id=230 The errors in the
            Message 5 of 16 , Jun 12, 2014
              Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
              signal SEGV"
              http://code.google.com/p/vim/issues/detail?id=230

              The errors in the libfontconfig.so look like a library problem: reading 4
              bytes where there are only 2. Because of alignment this probably does not
              cause a crash.

              The error below update_screen() is most likely what causes the crash.
              Can't see what happens there from this info though.

              --
              You received this message because this project is configured to send all
              issue notifications to this address.
              You may adjust your notification preferences at:
              https://code.google.com/hosting/settings

              --
              --
              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/d/optout.
            • Bram Moolenaar
              ... Yes, it looks like we are fixing a symptom, not the cause. I ll include this patch to avoid the crash, but we should keep looking for the cause. --
              Message 6 of 16 , Jun 12, 2014
                Christian wrote:

                > Comment #3 on issue 230 by chrisbr...@...: "Vim: Caught deadly
                > signal SEGV"
                > http://code.google.com/p/vim/issues/detail?id=230
                >
                > I can sometimes reproduce it. This patch fixes the crash for me:
                > diff --git a/src/window.c b/src/window.c
                > --- a/src/window.c
                > +++ b/src/window.c
                > @@ -4721,6 +4721,8 @@ win_alloc_lines(wp)
                > win_free_lsize(wp)
                > win_T *wp;
                > {
                > + if (wp == NULL)
                > + return;
                > vim_free(wp->w_lines);
                > wp->w_lines = NULL;
                > }
                >
                > There is however some other strange going on. Half of the times I run
                > ./vim -N -g -f --noplugin -u /tmp/vimrc file.c
                > the window opens fine, but Vim seems to get confused about the screensize.
                > The last line is not drawn correctly. If I do :set number, it jumps from 26
                > in the second last line to 32 in the last line.

                Yes, it looks like we are fixing a symptom, not the cause. I'll include
                this patch to avoid the crash, but we should keep looking for the cause.

                --
                Bravely bold Sir Robin, rode forth from Camelot,
                He was not afraid to die, Oh Brave Sir Robin,
                He was not at all afraid to be killed in nasty ways
                Brave, brave, brave, brave Sir Robin.
                "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                /// 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/d/optout.
              • Charles Campbell
                ... I tried this problem out: gvim -u junk.vim -U NONE macos (where junk.vim has the two lines the poster mentioned) * used binary compiled from an older
                Message 7 of 16 , Jun 12, 2014
                  vim@... wrote:
                  >
                  > Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                  > signal SEGV"
                  > http://code.google.com/p/vim/issues/detail?id=230
                  >
                  > The errors in the libfontconfig.so look like a library problem:
                  > reading 4 bytes where there are only 2. Because of alignment this
                  > probably does not cause a crash.
                  >
                  > The error below update_screen() is most likely what causes the crash.
                  > Can't see what happens there from this info though.
                  >
                  I tried this problem out: gvim -u junk.vim -U NONE macos (where
                  "junk.vim" has the two lines the poster mentioned)

                  * used binary compiled from an older machine: gvim -u junk.vim -U NONE macos
                  - got a crash and no status line
                  - gdb doesn't track gvim after gvim "separates" from the console (ie.
                  becomes its own process)
                  - binary wasn't compiled for debugging and was stripped

                  * recompiled vim for debugging and no stripping
                  - no crash, has status line
                  - valgrind reported no problems

                  I'm going to go and update with the new patches now...

                  Chip

                  --
                  --
                  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/d/optout.
                • Charles E Campbell
                  ... Hmm, apparently I was using an oddball version of vim that wasn t completely patched. So I ve now rebuilt vim 7.4.320; using valgrind --log-file=gvim.out
                  Message 8 of 16 , Jun 12, 2014
                    Charles Campbell wrote:
                    > vim@... wrote:
                    >>
                    >> Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                    >> signal SEGV"
                    >> http://code.google.com/p/vim/issues/detail?id=230
                    >>
                    >> The errors in the libfontconfig.so look like a library problem:
                    >> reading 4 bytes where there are only 2. Because of alignment this
                    >> probably does not cause a crash.
                    >>
                    >> The error below update_screen() is most likely what causes the
                    >> crash. Can't see what happens there from this info though.
                    >>
                    > I tried this problem out: gvim -u junk.vim -U NONE macos (where
                    > "junk.vim" has the two lines the poster mentioned)
                    >
                    > * used binary compiled from an older machine: gvim -u junk.vim -U NONE
                    > macos
                    > - got a crash and no status line
                    > - gdb doesn't track gvim after gvim "separates" from the console
                    > (ie. becomes its own process)
                    > - binary wasn't compiled for debugging and was stripped
                    >
                    > * recompiled vim for debugging and no stripping
                    > - no crash, has status line
                    > - valgrind reported no problems
                    >
                    > I'm going to go and update with the new patches now...
                    >
                    Hmm, apparently I was using an oddball version of vim that wasn't
                    completely patched. So I've now rebuilt vim 7.4.320; using

                    valgrind --log-file=gvim.out gvim -u junk.vim -U NONE macos

                    The attached file contains the log. Vim crashed eventually, but it took
                    a lot of j and k motions, sprinkled with the occasional L and G to get it.

                    Would one of you tell me how best to apply gdb to gvim? I suppose I
                    could run gvim and then attach gdb to it after its started.

                    Regards,
                    Chip

                    --
                    --
                    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/d/optout.
                  • Charles Campbell
                    ... OK, I attached to the gvim, moved the cursor about a bit, and got... (some of my comments are interlaced) Program received signal SIGSEGV, Segmentation
                    Message 9 of 16 , Jun 12, 2014
                      Charles Campbell wrote:
                      > vim@... wrote:
                      >>
                      >> Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                      >> signal SEGV"
                      >> http://code.google.com/p/vim/issues/detail?id=230
                      >>
                      >> The errors in the libfontconfig.so look like a library problem:
                      >> reading 4 bytes where there are only 2. Because of alignment this
                      >> probably does not cause a crash.
                      >>
                      >> The error below update_screen() is most likely what causes the
                      >> crash. Can't see what happens there from this info though.
                      >>
                      > I tried this problem out: gvim -u junk.vim -U NONE macos (where
                      > "junk.vim" has the two lines the poster mentioned)
                      >
                      > * used binary compiled from an older machine: gvim -u junk.vim -U NONE
                      > macos
                      > - got a crash and no status line
                      > - gdb doesn't track gvim after gvim "separates" from the console
                      > (ie. becomes its own process)
                      > - binary wasn't compiled for debugging and was stripped
                      >
                      > * recompiled vim for debugging and no stripping
                      > - no crash, has status line
                      > - valgrind reported no problems
                      >
                      > I'm going to go and update with the new patches now...
                      >
                      > Chip
                      >
                      OK, I attached to the gvim, moved the cursor about a bit, and got...
                      (some of my comments are interlaced)

                      Program received signal SIGSEGV, Segmentation fault.
                      0x000000000058a2c1 in char_needs_redraw (off_from=2241, off_to=5439488,
                      cols=14) at screen.c:5487
                      5487 && ((ScreenLines[off_from] != ScreenLines[off_to]
                      ---------------------------------------------------------------------
                      That off_to looks suspicious, as there are only 4245 characters in the
                      file I'm using...
                      ---------------------------------------------------------------------
                      (gdb) up
                      #1 0x000000000058a699 in screen_line (row=26, coloff=0, endcol=14,
                      clear_width=83, rlflag=0) at screen.c:5605
                      5605 redraw_next = char_needs_redraw(off_from, off_to, endcol - col);
                      ---------------------------------------------------------------------
                      Its 27 rows by 83 columns; nothing obvious yet.
                      I note that screen_line() computes off_to with
                      off_to = LineOffset[row] + coloff;
                      ---------------------------------------------------------------------
                      (gdb) p row
                      $8 = 26
                      (gdb) p LineOffset[row]
                      $9 = 5439488
                      (gdb) p coloff
                      $10 = 0
                      ---------------------------------------------------------------------
                      Looks like LineOffset[] has a problem. I don't see where LineOffset
                      is set up
                      ---------------------------------------------------------------------
                      (gdb) p LineOffset
                      $11 = (unsigned int *) 0xf435e0
                      ---------------------------------------------------------------------
                      Looks like a reasonable pointer.
                      ---------------------------------------------------------------------
                      (gdb) p LineOffset[0]
                      $13 = 747
                      (gdb) p LineOffset[1]
                      $14 = 830
                      (gdb) p LineOffset[2]
                      $15 = 913
                      (gdb) p LineOffset[3]
                      $16 = 996
                      (gdb) p LineOffset[row-1]
                      $17 = 0
                      (gdb) p LineOffset[row-2]

                      I'm going to pass on figuring out what LineOffset is all about. I've
                      attached the file I've been using for testing.

                      Regards,
                      Chip Campbell

                      --
                      --
                      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/d/optout.
                    • Bram Moolenaar
                      ... You have to run the GUI in the foreground. In gdb use run -f . Looks like somehow the data structures allocated for the screen don t match with the
                      Message 10 of 16 , Jun 12, 2014
                        Charles Campbell wrote:

                        > Charles Campbell wrote:
                        > > vim@... wrote:
                        > >>
                        > >> Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                        > >> signal SEGV"
                        > >> http://code.google.com/p/vim/issues/detail?id=230
                        > >>
                        > >> The errors in the libfontconfig.so look like a library problem:
                        > >> reading 4 bytes where there are only 2. Because of alignment this
                        > >> probably does not cause a crash.
                        > >>
                        > >> The error below update_screen() is most likely what causes the
                        > >> crash. Can't see what happens there from this info though.
                        > >>
                        > > I tried this problem out: gvim -u junk.vim -U NONE macos (where
                        > > "junk.vim" has the two lines the poster mentioned)
                        > >
                        > > * used binary compiled from an older machine: gvim -u junk.vim -U NONE
                        > > macos
                        > > - got a crash and no status line
                        > > - gdb doesn't track gvim after gvim "separates" from the console
                        > > (ie. becomes its own process)
                        > > - binary wasn't compiled for debugging and was stripped
                        > >
                        > > * recompiled vim for debugging and no stripping
                        > > - no crash, has status line
                        > > - valgrind reported no problems
                        > >
                        > > I'm going to go and update with the new patches now...
                        >
                        > Hmm, apparently I was using an oddball version of vim that wasn't
                        > completely patched. So I've now rebuilt vim 7.4.320; using
                        >
                        > valgrind --log-file=gvim.out gvim -u junk.vim -U NONE macos
                        >
                        > The attached file contains the log. Vim crashed eventually, but it took
                        > a lot of j and k motions, sprinkled with the occasional L and G to get it.
                        >
                        > Would one of you tell me how best to apply gdb to gvim? I suppose I
                        > could run gvim and then attach gdb to it after its started.

                        You have to run the GUI in the foreground. In gdb use "run -f".

                        Looks like somehow the data structures allocated for the screen don't
                        match with the screen size. That's weird.

                        It probably matters what the terminal size is you start with. Was that
                        24 x 80?

                        --
                        GALAHAD turns back. We see from his POV the lovely ZOOT standing by him
                        smiling enchantingly and a number of equally delectable GIRLIES draped
                        around in the seductively poulticed room. They look at him smilingly and
                        wave.
                        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                        /// 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/d/optout.
                      • Charles E Campbell
                        ... The terminal I used to kick off gvim was 253x37. I m using vim 7.4.320 on a Scientific Linux 6.5 system. My configure command is: ./configure
                        Message 11 of 16 , Jun 12, 2014
                          Bram Moolenaar wrote:
                          > Charles Campbell wrote:
                          >
                          >> Charles Campbell wrote:
                          >>> vim@... wrote:
                          >>>> Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                          >>>> signal SEGV"
                          >>>> http://code.google.com/p/vim/issues/detail?id=230
                          >>>>
                          >>>> The errors in the libfontconfig.so look like a library problem:
                          >>>> reading 4 bytes where there are only 2. Because of alignment this
                          >>>> probably does not cause a crash.
                          >>>>
                          >>>> The error below update_screen() is most likely what causes the
                          >>>> crash. Can't see what happens there from this info though.
                          >>>>
                          >>> I tried this problem out: gvim -u junk.vim -U NONE macos (where
                          >>> "junk.vim" has the two lines the poster mentioned)
                          >>>
                          >>> * used binary compiled from an older machine: gvim -u junk.vim -U NONE
                          >>> macos
                          >>> - got a crash and no status line
                          >>> - gdb doesn't track gvim after gvim "separates" from the console
                          >>> (ie. becomes its own process)
                          >>> - binary wasn't compiled for debugging and was stripped
                          >>>
                          >>> * recompiled vim for debugging and no stripping
                          >>> - no crash, has status line
                          >>> - valgrind reported no problems
                          >>>
                          >>> I'm going to go and update with the new patches now...
                          >> Hmm, apparently I was using an oddball version of vim that wasn't
                          >> completely patched. So I've now rebuilt vim 7.4.320; using
                          >>
                          >> valgrind --log-file=gvim.out gvim -u junk.vim -U NONE macos
                          >>
                          >> The attached file contains the log. Vim crashed eventually, but it took
                          >> a lot of j and k motions, sprinkled with the occasional L and G to get it.
                          >>
                          >> Would one of you tell me how best to apply gdb to gvim? I suppose I
                          >> could run gvim and then attach gdb to it after its started.
                          > You have to run the GUI in the foreground. In gdb use "run -f".
                          >
                          > Looks like somehow the data structures allocated for the screen don't
                          > match with the screen size. That's weird.
                          >
                          > It probably matters what the terminal size is you start with. Was that
                          > 24 x 80?
                          >
                          The terminal I used to kick off gvim was 253x37.
                          I'm using vim 7.4.320 on a Scientific Linux 6.5 system.
                          My configure command is:
                          ./configure --with-features=huge
                          --enable-gui=gtk2 --enable-perlinterp
                          --enable-pythoninterp --enable-cscope

                          Regards,
                          Chip Campbell


                          --
                          --
                          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/d/optout.
                        • Christian Brabandt
                          ... It s not the screen size, that seems to be correct. The problem is, set ls=2. This causes a recursive call to win_new_height() and therefore does not
                          Message 12 of 16 , Jun 12, 2014
                            On Do, 12 Jun 2014, Bram Moolenaar wrote:

                            > Looks like somehow the data structures allocated for the screen don't
                            > match with the screen size. That's weird.

                            It's not the screen size, that seems to be correct.
                            The problem is, set ls=2. This causes a recursive call to win_new_height() and
                            therefore does not adjust the window height correctly.

                            This patch fixes it for me:
                            diff --git a/src/window.c b/src/window.c
                            --- a/src/window.c
                            +++ b/src/window.c
                            @@ -5650,7 +5650,10 @@ win_new_height(wp, height)
                            if (wp->w_height > 0)
                            {
                            if (wp == curwin)
                            - validate_cursor(); /* w_wrow needs to be valid */
                            + /* w_wrow needs to be valid, might call win_new_height recursively... */
                            + validate_cursor();
                            + if (wp->w_height != prev_height)
                            + return; /* recursive call already changed window size */
                            if (wp->w_wrow != wp->w_prev_fraction_row)
                            set_fraction(wp);
                            }


                            Best,
                            Christian
                            --
                            Es ist nicht halb so ungesund, Philosophie zu lehren, als zu lernen,
                            e(ine) Philos(ophie) zu machen als zu lesen.
                            -- Jean Paul

                            --
                            --
                            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/d/optout.
                          • Charles Campbell
                            ... I tried this operation again with different initial terminal sizes. * terminal: 125x37 -- I get no status line and eventually I get a SIGSEGV * terminal:
                            Message 13 of 16 , Jun 12, 2014
                              Charles E Campbell wrote:
                              > Bram Moolenaar wrote:
                              >> Charles Campbell wrote:
                              >>
                              >>> Charles Campbell wrote:
                              >>>> vim@... wrote:
                              >>>>> Comment #4 on issue 230 by brammool...@...: "Vim: Caught deadly
                              >>>>> signal SEGV"
                              >>>>> http://code.google.com/p/vim/issues/detail?id=230
                              >>>>>
                              >>>>> The errors in the libfontconfig.so look like a library problem:
                              >>>>> reading 4 bytes where there are only 2. Because of alignment this
                              >>>>> probably does not cause a crash.
                              >>>>>
                              >>>>> The error below update_screen() is most likely what causes the
                              >>>>> crash. Can't see what happens there from this info though.
                              >>>>>
                              >>>> I tried this problem out: gvim -u junk.vim -U NONE macos (where
                              >>>> "junk.vim" has the two lines the poster mentioned)
                              >>>>
                              >>>> * used binary compiled from an older machine: gvim -u junk.vim -U NONE
                              >>>> macos
                              >>>> - got a crash and no status line
                              >>>> - gdb doesn't track gvim after gvim "separates" from the console
                              >>>> (ie. becomes its own process)
                              >>>> - binary wasn't compiled for debugging and was stripped
                              >>>>
                              >>>> * recompiled vim for debugging and no stripping
                              >>>> - no crash, has status line
                              >>>> - valgrind reported no problems
                              >>>>
                              >>>> I'm going to go and update with the new patches now...
                              >>> Hmm, apparently I was using an oddball version of vim that wasn't
                              >>> completely patched. So I've now rebuilt vim 7.4.320; using
                              >>>
                              >>> valgrind --log-file=gvim.out gvim -u junk.vim -U NONE macos
                              >>>
                              >>> The attached file contains the log. Vim crashed eventually, but it
                              >>> took
                              >>> a lot of j and k motions, sprinkled with the occasional L and G to
                              >>> get it.
                              >>>
                              >>> Would one of you tell me how best to apply gdb to gvim? I suppose I
                              >>> could run gvim and then attach gdb to it after its started.
                              >> You have to run the GUI in the foreground. In gdb use "run -f".
                              >>
                              >> Looks like somehow the data structures allocated for the screen don't
                              >> match with the screen size. That's weird.
                              >>
                              >> It probably matters what the terminal size is you start with. Was that
                              >> 24 x 80?
                              >>
                              > The terminal I used to kick off gvim was 253x37.
                              > I'm using vim 7.4.320 on a Scientific Linux 6.5 system.
                              > My configure command is:
                              > ./configure --with-features=huge
                              > --enable-gui=gtk2 --enable-perlinterp
                              > --enable-pythoninterp --enable-cscope
                              I tried this operation again with different initial terminal sizes.

                              * terminal: 125x37 -- I get no status line and eventually I get a SIGSEGV
                              * terminal: 50 x 20 -- I get a status line and haven't seen a SIGSEGV
                              * I restored the terminal to 125x37, but this time I used the mouse
                              to grab the corner and expand the gvim screen. I pull it down just one
                              line and the status line appears, and I haven't been able to get it to
                              core dump based on cursor movement.

                              Regards,
                              Chip

                              --
                              --
                              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/d/optout.
                            • Charles Campbell
                              ... Hello, Christian: Nice! It fixes the problem that I saw; when I bring up gvim with the OP s .vimrc it now shows the status line and does not eventually
                              Message 14 of 16 , Jun 13, 2014
                                Christian Brabandt wrote:
                                > diff --git a/src/window.c b/src/window.c
                                > --- a/src/window.c
                                > +++ b/src/window.c
                                > @@ -5650,7 +5650,10 @@ win_new_height(wp, height)
                                > if (wp->w_height > 0)
                                > {
                                > if (wp == curwin)
                                > - validate_cursor(); /* w_wrow needs to be valid */
                                > + /* w_wrow needs to be valid, might call win_new_height recursively... */
                                > + validate_cursor();
                                > + if (wp->w_height != prev_height)
                                > + return; /* recursive call already changed window size */
                                > if (wp->w_wrow != wp->w_prev_fraction_row)
                                > set_fraction(wp);
                                > }
                                Hello, Christian:

                                Nice! It fixes the problem that I saw; when I bring up gvim with the
                                OP's .vimrc it now shows the status line and does not eventually crash
                                due to jkLG motions.

                                Regards,
                                Chip

                                --
                                --
                                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/d/optout.
                              • Bram Moolenaar
                                ... That is weird. I still can t reproduce it. This does make more sense than the check for the NULL pointer. -- DINGO: You must spank her well and after
                                Message 15 of 16 , Jun 13, 2014
                                  Christian Brabandt wrote:

                                  > On Do, 12 Jun 2014, Bram Moolenaar wrote:
                                  >
                                  > > Looks like somehow the data structures allocated for the screen don't
                                  > > match with the screen size. That's weird.
                                  >
                                  > It's not the screen size, that seems to be correct.
                                  > The problem is, set ls=2. This causes a recursive call to
                                  > win_new_height() and therefore does not adjust the window height
                                  > correctly.
                                  >
                                  > This patch fixes it for me:
                                  > diff --git a/src/window.c b/src/window.c
                                  > --- a/src/window.c
                                  > +++ b/src/window.c
                                  > @@ -5650,7 +5650,10 @@ win_new_height(wp, height)
                                  > if (wp->w_height > 0)
                                  > {
                                  > if (wp == curwin)
                                  > - validate_cursor(); /* w_wrow needs to be valid */
                                  > + /* w_wrow needs to be valid, might call win_new_height recursively... */
                                  > + validate_cursor();
                                  > + if (wp->w_height != prev_height)
                                  > + return; /* recursive call already changed window size */
                                  > if (wp->w_wrow != wp->w_prev_fraction_row)
                                  > set_fraction(wp);
                                  > }

                                  That is weird. I still can't reproduce it. This does make more sense
                                  than the check for the NULL pointer.

                                  --
                                  DINGO: You must spank her well and after you have spanked her you
                                  may deal with her as you like and then ... spank me.
                                  AMAZING: And spank me!
                                  STUNNER: And me.
                                  LOVELY: And me.
                                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                                  /// 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/d/optout.
                                • vim@...
                                  Updates: Status: Fixed Comment #5 on issue 230 by chrisbr...@googlemail.com: Vim: Caught deadly signal SEGV
                                  Message 16 of 16 , Oct 2, 2014
                                    Updates:
                                    Status: Fixed

                                    Comment #5 on issue 230 by chrisbr...@...: "Vim: Caught deadly
                                    signal SEGV"
                                    https://code.google.com/p/vim/issues/detail?id=230

                                    fixed by 7.4.235

                                    --
                                    You received this message because this project is configured to send all
                                    issue notifications to this address.
                                    You may adjust your notification preferences at:
                                    https://code.google.com/hosting/settings

                                    --
                                    --
                                    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/d/optout.
                                  Your message has been successfully submitted and would be delivered to recipients shortly.