Hi vimmers
I have some news about the crash.
1) Minimal requirement to build a gvim.exe that crashes with
Microsoft Visual Studio 2005 Express Edition (VSEE):
nmake -f Make_mvc.mak FEATURES=NORMAL GUI=yes OLE=yes \
MBYTE=no IME=no GIME=no SNIFF=yes CSCOPE=no \
ICONV=no GETTEXT=no POSTSCRIPT=no
That means: gvim.exe has the problem only if all three following
conditions are met:
a) OLE=yes
b) SNIFF=yes
c) Close gvim.exe only after 15 minutes
Sometimes, gvim seems to close properly, but in the Taskmanager
one can see that gvim is yet there.
2) One can also build a huge debug version of vim and enable much
more feature to let gvim show this behaviour.
3) The crash happens as follows: Within the source file
src/os_mswin.c the function mch_exit() is called as soon as you
press :q within gvim.exe. Now, the function UninitOLE(), defined
in src/if_ole.c, called. This function calls the Windows API
function OleUninitialize(), which alas never returns.
I don't know how to find out where the problem is. Perhaps, there
are some resources yet occupied, or some messages in a message
queue of some hidden window, that leads OleUninitialize() to stop
the whole program -- I'm not a specialist for such things.
4) Why does this happen only after gvim was running for 10 minutes
or more? Perhaps this also depends on a time constant of the
operating system: I had read somewhere that Windows unloads all
10 minutes some dlls that seam to not be in use any more.
My work around: Don't use the SNIFF feature on Windows.
Apropos SNIFF: The source file if_sniff.c is missing in the pc
source package ftp://ftp.vim.org/pub/vim/pc/vim70src.zip. I got it
from ftp://ftp.vim.org/pub/vim/extra/vim-7.0-extra.tar.gz. As
mentioned in http://groups.yahoo.com/group/vimdev/message/43780, I'm
not sure if that has a reason or not. Strange coincidence!
With best regards
Mathias