gVIM crash condition and workaround

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

gVIM crash condition and workaround

Sean-130
It happened when Python Interface to Vim is used.

-----------------
Crash Conditions:
-----------------

(1) standard gVim.exe downloaded from http://www.vim.org/download.php
(2) standard python2.7 downloaded from http://www.python.org/
(3) Microsoft Windows, Vista
(4) gvim -u NONE -U NONE --noplugin
(5) :py print(help('io'))

------------------
Crash Information:
------------------

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: gvim.exe
  Application Version: 7.3.277.0
  Application Timestamp: 4cc84c7e
  Fault Module Name: python27.dll
  Fault Module Version: 2.7.2150.1013
  Fault Module Timestamp: 4df4ba7c
  Exception Code: c0000005
  Exception Offset: 0009943a
  OS Version: 6.0.6001.2.1.0.256.4
  Locale ID: 1033
  Additional Information 1: 186d
  Additional Information 2: d18d5278802f03194a89676f1de028a8
  Additional Information 3: 9e65
  Additional Information 4: 4c2e0a72b7772fe1e35949a380f36aa6
Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

--------------
gVIM :version
--------------
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-46
Compiled by Bram@KIBAALE

-----------
root cause:
-----------
vim C:/Python27/Lib/pydoc.py

def getpager():
    """Decide what method to use for paging through text."""
    if type(sys.stdout) is not types.FileType:
    ------------------ crash here
        return plainpager

-----------
workaround:
-----------
Simply commented out above two offending lines:
  # if type(sys.stdout) is not types.FileType:
  #     return plainpager


---------
Question:
---------
While the root cause seems a bug in Python2.7, it is possible to
avoid crashing gVim by some kind of try/catch/endtry block from vim?



Sean

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: gVIM crash condition and workaround

Bram Moolenaar

Sean Xiangjian Ma wrote:

> It happened when Python Interface to Vim is used.
>
> -----------------
> Crash Conditions:
> -----------------
>
> (1) standard gVim.exe downloaded from http://www.vim.org/download.php
> (2) standard python2.7 downloaded from http://www.python.org/
> (3) Microsoft Windows, Vista
> (4) gvim -u NONE -U NONE --noplugin
> (5) :py print(help('io'))
>
> ------------------
> Crash Information:
> ------------------
>
> Problem signature:
>   Problem Event Name: APPCRASH
>   Application Name: gvim.exe
>   Application Version: 7.3.277.0
>   Application Timestamp: 4cc84c7e
>   Fault Module Name: python27.dll
>   Fault Module Version: 2.7.2150.1013
>   Fault Module Timestamp: 4df4ba7c
>   Exception Code: c0000005
>   Exception Offset: 0009943a
>   OS Version: 6.0.6001.2.1.0.256.4
>   Locale ID: 1033
>   Additional Information 1: 186d
>   Additional Information 2: d18d5278802f03194a89676f1de028a8
>   Additional Information 3: 9e65
>   Additional Information 4: 4c2e0a72b7772fe1e35949a380f36aa6
> Read our privacy statement:
>   http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
>
> --------------
> gVIM :version
> --------------
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
> MS-Windows 32-bit GUI version with OLE support
> Included patches: 1-46
> Compiled by Bram@KIBAALE
>
> -----------
> root cause:
> -----------
> vim C:/Python27/Lib/pydoc.py
>
> def getpager():
>     """Decide what method to use for paging through text."""
>     if type(sys.stdout) is not types.FileType:
>     ------------------ crash here
>         return plainpager
>
> -----------
> workaround:
> -----------
> Simply commented out above two offending lines:
>   # if type(sys.stdout) is not types.FileType:
>   #     return plainpager
>
>
> ---------
> Question:
> ---------
> While the root cause seems a bug in Python2.7, it is possible to
> avoid crashing gVim by some kind of try/catch/endtry block from vim?

I believe his was fixed by Patch 7.3 144.

--
FATHER: One day, lad, all this will be yours ...
PRINCE: What - the curtains?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- 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_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: gVIM crash condition and workaround

Benjamin R. Haskell-8
In reply to this post by Sean-130
On Sun, 17 Jul 2011, Sean wrote:

> It happened when Python Interface to Vim is used.
>
> [...]
>
> ------------------
> Crash Information:
> ------------------
>  Application Name: gvim.exe
>  Application Version: 7.3.277.0
> [...]
>
> --------------
> gVIM :version
> --------------
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
> MS-Windows 32-bit GUI version with OLE support
> Included patches: 1-46

Do you have more than one version of gvim installed?  Otherwise, I'm not
sure why the Application Version from the "Crash Information" would
report 7.3.277.0, but included patches would report only 1-46.  (Usually
the 'x' in '7.3.x' is the latest patch.)

--
Best,
Ben

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: gVIM crash condition and workaround

Dominique Pellé
In reply to this post by Sean-130
Sean wrote:

> It happened when Python Interface to Vim is used.
>
> -----------------
> Crash Conditions:
> -----------------
>
> (1) standard gVim.exe downloaded from http://www.vim.org/download.php
> (2) standard python2.7 downloaded from http://www.python.org/
> (3) Microsoft Windows, Vista
> (4) gvim -u NONE -U NONE --noplugin
> (5) :py print(help('io'))
>
> ------------------
> Crash Information:
> ------------------
>
> Problem signature:
>  Problem Event Name:   APPCRASH
>  Application Name:     gvim.exe
>  Application Version:  7.3.277.0

I wonder where this version number comes from.

The latest version of Vim is 7.3.254
So your version is from the future.

-- Dominique

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: gVIM crash condition and workaround

Sean-130
In reply to this post by Benjamin R. Haskell-8
Interesting.   No, I don't have multiple gvim.exe.  Don't know how
7.3.277.0 came out.

I just double confirmed by running directly

$ /home/xma/vim/gvim -u NONE -U NONE --noplugin

(1) No crash if I ran:    :py print(help('sys'))
(2) crash if I ran it the first time   :py print(help('io'))
(3) No more crash when workaround used, by editing pydoc.py

Also, about the 'official' gvim.exe from http://www.vim.org/download.php#pc

(1)  No "Python Interface to Vim" from the zip file

    GUI executable   gvim##.zip    gvim73_46.zip
    This is the "normal" GUI version.

    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:56:10)
    MS-Windows 32-bit GUI version
    Included patches: 1-46
    Compiled by Bram@KIBAALE
    Big version with GUI.  Features included (+) or not (-):
    ...  -python -python3

(2)  The only way to get "+python" version of gvim.exe is to run the
executable installer:  (install, save gvim.exe, and un-install :))

PC: MS-DOS and MS-Windows
For modern MS-Windows systems (starting with XP)
    gvim73_46.exe


Thanks
Sean


On Jul 18, 9:53 am, "Benjamin R. Haskell" <[hidden email]> wrote:

> On Sun, 17 Jul 2011, Sean wrote:
> > It happened when Python Interface to Vim is used.
>
> > [...]
>
> > ------------------
> > Crash Information:
> > ------------------
> >  Application Name: gvim.exe
> >  Application Version:      7.3.277.0
> > [...]
>
> > --------------
> > gVIM :version
> > --------------
> > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
> > MS-Windows 32-bit GUI version with OLE support
> > Included patches: 1-46
>
> Do you have more than one version of gvim installed?  Otherwise, I'm not
> sure why the Application Version from the "Crash Information" would
> report 7.3.277.0, but included patches would report only 1-46.  (Usually
> the 'x' in '7.3.x' is the latest patch.)
>
> --
> Best,
> Ben

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: gVIM crash condition and workaround

Tony Mechelynck
In reply to this post by Dominique Pellé
On 18/07/11 20:16, Dominique Pellé wrote:

> Sean wrote:
>
>> It happened when Python Interface to Vim is used.
>>
>> -----------------
>> Crash Conditions:
>> -----------------
>>
>> (1) standard gVim.exe downloaded from http://www.vim.org/download.php
>> (2) standard python2.7 downloaded from http://www.python.org/
>> (3) Microsoft Windows, Vista
>> (4) gvim -u NONE -U NONE --noplugin
>> (5) :py print(help('io'))
>>
>> ------------------
>> Crash Information:
>> ------------------
>>
>> Problem signature:
>>   Problem Event Name:   APPCRASH
>>   Application Name:     gvim.exe
>>   Application Version:  7.3.277.0
>
> I wonder where this version number comes from.
>
> The latest version of Vim is 7.3.254
> So your version is from the future.
>
> -- Dominique
>

It's some Windows identifier which is not necessarily related with the
Vim version (major.minor.patchlevel) as we know it. I suppose it comes
frome somewhere in the source, but I'm not sure exactly where...

Ah, there: src/version.h line 22:
#define VIM_VERSION_BUILD 277

see also e.g. src/vim.rc lines 63-64
   FILEVERSION
VIM_VERSION_MAJOR,VIM_VERSION_MINOR,VIM_VERSION_BUILD,VIM_VERSION_PATCHLEVEL
   PRODUCTVERSION
VIM_VERSION_MAJOR,VIM_VERSION_MINOR,VIM_VERSION_BUILD,VIM_VERSION_PATCHLEVEL


Best regards,
Tony.
--
Well, my terminal's locked up, and I ain't got any Mail,
        And I can't recall the last time that my program didn't fail;
I've got stacks in my structs, I've got arrays in my queues,
        I've got the : Segmentation violation -- Core dumped blues.

If you think that it's nice that you get what you C,
        Then go : illogical statement with your whole family,
'Cause the Supreme Court ain't the only place with : Bus error views.
        I've got the : Segmentation violation -- Core dumped blues.

On a PDP-11, life should be a breeze,
        But with VAXen in the house even magnetic tapes would freeze.
Now you might think that unlike VAXen I'd know who I abuse,
        I've got the : Segmentation violation -- Core dumped blues.
                -- Core Dumped Blues

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