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

Re: Vim 6.1 Crash on startup (Windows2000)

Expand Messages
  • Bram Moolenaar
    ... First of all try starting gvim from the command line on this file: gvim filename If this doesn t crash, try a few variations to find out why (from a
    Message 1 of 7 , Sep 2, 2002
    • 0 Attachment
      Matthias Ulrich wrote:

      > I am facing a Problem with my Vim, it sometimes crashes very badly.
      > It seems to happen when I open a file for editing, but I could never
      > reproduce the bug. Now I can.
      >
      > I have a certain file, when I open it with "Edit in Vim" on my machine, VIM
      > imediately crashes with a memory access violation.
      >
      > First of all it's quite anoying for me, but mainly I want to contribute to
      > the vim development locating and removing this bug.
      >
      > The bug seems to be not very reproducable, and mabye its also reladed to
      > some of my plugins and mappings...
      >
      > If anybody is intreseted I would love to help to loacate and eliminate this
      > bug. I could also recompile, debug and more, if someone would give me
      > some input where to start.

      First of all try starting gvim from the command line on this file:

      gvim filename

      If this doesn't crash, try a few variations to find out why (from a
      different directory, use the full path name).
      If this does crash, try:

      gvim -u NONE -u NONE filename

      If it doesn't crash, go back to the previous command and try removing
      things from your _vimrc and/or _gvimrc files until it no longer crashes.
      Then you can figure out what command causes the crash.

      You can also try compiling Vim for debugging and start it in a debugger.

      --
      CUSTOMER: Well, can you hang around a couple of minutes? He won't be
      long.
      MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today.
      CUSTOMER: Well, when is your next round?
      MORTICIAN: Thursday.
      DEAD PERSON: I think I'll go for a walk.
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    • Matthias Ulrich
      Hi, ... Doesn t crash. ... I couldn t make it crash from the commandline at all... I went to different drives, different directories, same directory, complete
      Message 2 of 7 , Sep 3, 2002
      • 0 Attachment
        Hi,


        Bram@... [mailto:Bram@...] wrote:
        >
        > First of all try starting gvim from the command line on this file:
        >
        > gvim filename
        >
        Doesn't crash.

        > If this doesn't crash, try a few variations to find out why (from a
        > different directory, use the full path name).

        I couldn't make it crash from the commandline at all...

        I went to different drives, different directories, same directory,
        complete filename and path, just filename, ... almost all variations...
        No crash.



        What's the difference between the windows context menu "Edit in Vim"
        and the commandline "gvim filename"

        Is there anybody facing similar problems on Windows2000???


        Matthias
      • David Fishburn
        Yes, I have similar problems (W2K). Occassionally when I :e file_name it will crash. I am using 6.1.165. I have recently built the debug versions and now I
        Message 3 of 7 , Sep 3, 2002
        • 0 Attachment
          Yes, I have similar problems (W2K).

          Occassionally when I :e file_name it will crash.

          I am using 6.1.165. I have recently built the debug versions and now I
          run those in case this happens again (been a week now without). If it
          does happen, I hope to post the call stack to see if that will help
          narrow down the problem.

          Dave

          -----Original Message-----
          From: Matthias Ulrich [mailto:mulrich@...]
          Sent: Tuesday, September 03, 2002 10:59 AM
          To: Bram@...
          Cc: Vim Mailing List
          Subject: RE: Vim 6.1 Crash on startup (Windows2000)


          Hi,


          Bram@... [mailto:Bram@...] wrote:
          >
          > First of all try starting gvim from the command line on this file:
          >
          > gvim filename
          >
          Doesn't crash.

          > If this doesn't crash, try a few variations to find out why (from a
          > different directory, use the full path name).

          I couldn't make it crash from the commandline at all...

          I went to different drives, different directories, same directory,
          complete filename and path, just filename, ... almost all variations...
          No crash.



          What's the difference between the windows context menu "Edit in Vim"
          and the commandline "gvim filename"

          Is there anybody facing similar problems on Windows2000???


          Matthias
        • David Fishburn
          Okay, it just happened again. I have been running with 6.1.165 W2K from the source that I have built. I have caught the exception in Microsoft Visual Studio (I
          Message 4 of 7 , Sep 12, 2002
          • 0 Attachment
            Okay, it just happened again.
            I have been running with 6.1.165 W2K from the source that I have built.

            I have caught the exception in Microsoft Visual Studio (I still have it
            running).
            I have never looked at the source before.

            Here is the call stack:
            in_id_list(state_item * 0x0111ae48, short * 0x00000000, sp_syn *
            0x01730470, int 0) line 5566 + 20 bytes
            syn_current_attr(int 0, int 1) line 1884 + 173 bytes
            get_syntax_attr(unsigned int 1) line 1678 + 9 bytes
            win_line(window * 0x010faed0, long 1, int 0, int 37) line 3313 + 15
            bytes
            win_update(window * 0x010faed0) line 1619 + 24 bytes
            update_screen(int 40) line 501 + 9 bytes
            main_loop(int 0) line 1978 + 7 bytes
            VimMain() line 1883 + 7 bytes
            WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
            0x00232c7f, int 10) line 204 + 14 bytes
            WinMainCRTStartup() line 198 + 54 bytes
            KERNEL32! 77e8d326()


            It crashed at this line:
            if (in_id_list(NULL, ssp->cont_in_list,
            &(SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_syn),
            SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_flags &
            HL_CONTAINED))

            From this block of code:
            /* If spp has a "containedin" list and "cur_si" is in it, return
            TRUE. */
            if (cur_si != NULL && ssp->cont_in_list != NULL)
            {
            /* Ignore transparent items without a contains argument. */
            while (cur_si->si_flags & HL_TRANS_CONT)
            --cur_si;
            if (in_id_list(NULL, ssp->cont_in_list,
            &(SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_syn),
            SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_flags &
            HL_CONTAINED))
            return TRUE;
            }


            I still have this in the debugger, if that will help anyone.
            I will leave it in the debugger for a while (assuming I can still edit
            the files I need to), if anyone would like me to get more information
            (assuming they have time).

            Thanks,
            Dave


            -----Original Message-----
            From: David Fishburn [mailto:fishburn@...]
            Sent: Tuesday, September 03, 2002 11:04 AM
            To: 'Matthias Ulrich'; Bram@...
            Cc: 'Vim Mailing List'
            Subject: RE: Vim 6.1 Crash on startup (Windows2000)


            Yes, I have similar problems (W2K).

            Occassionally when I :e file_name it will crash.

            I am using 6.1.165. I have recently built the debug versions and now I
            run those in case this happens again (been a week now without). If it
            does happen, I hope to post the call stack to see if that will help
            narrow down the problem.

            Dave

            -----Original Message-----
            From: Matthias Ulrich [mailto:mulrich@...]
            Sent: Tuesday, September 03, 2002 10:59 AM
            To: Bram@...
            Cc: Vim Mailing List
            Subject: RE: Vim 6.1 Crash on startup (Windows2000)


            Hi,


            Bram@... [mailto:Bram@...] wrote:
            >
            > First of all try starting gvim from the command line on this file:
            >
            > gvim filename
            >
            Doesn't crash.

            > If this doesn't crash, try a few variations to find out why (from a
            > different directory, use the full path name).

            I couldn't make it crash from the commandline at all...

            I went to different drives, different directories, same directory,
            complete filename and path, just filename, ... almost all variations...
            No crash.



            What's the difference between the windows context menu "Edit in Vim"
            and the commandline "gvim filename"

            Is there anybody facing similar problems on Windows2000???


            Matthias
          • Charles E. Campbell
            ... Hello! I was wondering, as you never commented on it, did you ever fix the SQLFormat() function problem I pointed out during your previously reported
            Message 5 of 7 , Sep 12, 2002
            • 0 Attachment
              On Thu, Sep 12, 2002 at 10:30:50AM -0400, David Fishburn wrote:
              > Okay, it just happened again. I have been running with 6.1.165 W2K
              > from the source that I have built.
              >
              > I have caught the exception in Microsoft Visual Studio...
              ---------------------------------------------------------------------

              Hello!

              I was wondering, as you never commented on it, did you ever fix the
              SQLFormat() function problem I pointed out during your previously
              reported crash? As I recall there was a line...

              '<,'<g/^\s*$/d

              (although I thought it was meant to be '<,'>g/^\s*$/d) that deleted
              empty/white-space-only lines. The problem I pointed out was that this
              operation could leave the '< and '> marks ill-defined (some huge number
              resulted with your example). Subsequent code in that function was
              re-using '< and '>, and the previous crash came later during such a
              re-use.

              The trick I use is to put empty guard lines above and below

              " save x,y marks
              b:xline= line("'x")
              b:xcol = virtcol("'x")
              b:yline= line("'y")
              b:ycol = virtcol("'y")

              norm! '>
              put =''
              kx
              norm! '<
              put! =''
              ky

              then, instead of '< and '> I'd suggest using 'x+1,'y-1. When your
              script is done it can restore the marks.

              if b:xline != 0
              exe "norm! ".b:xline."G".b:xcol."\<bar>"
              endif
              if b:yline != 0
              eye "norm! ".b:yline."G".b:ycol."\<bar>"
              endif

              You can also use Benji Fisher's Mark() functions from his <foo.vim>
              to save and restore marks (on http://vim.sf.net)

              Regards,
              Chip Campbell

              --
              Charles E Campbell, Jr, PhD _ __ __
              Goddard Space Flight Center / /_/\_\_/ /
              cec@... /_/ \/_//_/
              PGP public key: http://www.erols.com/astronaut/pgp.html
            • David Fishburn
              ... SQLFormat() function problem I pointed out during your previously reported crash? As I recall there was a line...
              Message 6 of 7 , Sep 12, 2002
              • 0 Attachment
                > I was wondering, as you never commented on it, did you ever fix the
                SQLFormat() function problem I pointed out during your previously
                reported crash? As I recall there was a line...

                '<,'<g/^\s*$/d


                Yes, after the changes you suggested I put in the code that functions
                you provided.
                Very similar to what you do in Align.vim.

                So everything references 'y+1 and 'z-1 instead of '<,'>.

                Dave




                -----Original Message-----
                From: Charles E. Campbell [mailto:cec@...]
                Sent: Thursday, September 12, 2002 12:17 PM
                To: David Fishburn
                Cc: Vim
                Subject: Re: [vim] Vim 6.1.165 Crash editing a file (Windows2000)


                On Thu, Sep 12, 2002 at 10:30:50AM -0400, David Fishburn wrote:
                > Okay, it just happened again. I have been running with 6.1.165 W2K
                > from the source that I have built.
                >
                > I have caught the exception in Microsoft Visual Studio...
                ---------------------------------------------------------------------

                Hello!

                I was wondering, as you never commented on it, did you ever fix the
                SQLFormat() function problem I pointed out during your previously
                reported crash? As I recall there was a line...

                '<,'<g/^\s*$/d

                (although I thought it was meant to be '<,'>g/^\s*$/d) that deleted
                empty/white-space-only lines. The problem I pointed out was that this
                operation could leave the '< and '> marks ill-defined (some huge number
                resulted with your example). Subsequent code in that function was
                re-using '< and '>, and the previous crash came later during such a
                re-use.

                The trick I use is to put empty guard lines above and below

                " save x,y marks
                b:xline= line("'x")
                b:xcol = virtcol("'x")
                b:yline= line("'y")
                b:ycol = virtcol("'y")

                norm! '>
                put =''
                kx
                norm! '<
                put! =''
                ky

                then, instead of '< and '> I'd suggest using 'x+1,'y-1. When your
                script is done it can restore the marks.

                if b:xline != 0
                exe "norm! ".b:xline."G".b:xcol."\<bar>"
                endif
                if b:yline != 0
                eye "norm! ".b:yline."G".b:ycol."\<bar>"
                endif

                You can also use Benji Fisher's Mark() functions from his <foo.vim> to
                save and restore marks (on http://vim.sf.net)

                Regards,
                Chip Campbell

                --
                Charles E Campbell, Jr, PhD _ __ __
                Goddard Space Flight Center / /_/\_\_/ /
                cec@... /_/ \/_//_/
                PGP public key: http://www.erols.com/astronaut/pgp.html
              Your message has been successfully submitted and would be delivered to recipients shortly.