crash w32 gvim 7.1 (2007 May 12) with BufExplore

11 views
Skip to first unread message

haron

unread,
Feb 26, 2008, 5:24:59 AM2/26/08
to vim_use
I use BufExplore plugin intensively (http://www.vim.org/scripts/
script.php?script_id=42), and have recently discover situation, when
gvim crashes with it.

1. start cmd
2. c:
3. mkdir tst
4. cd tst
5. mkdir b
6. "c:\Program Files\Vim\vim71\gvim.exe" tmp-a.txt tmp-b.txt
7 :BufExplorer<CR>
Now vim crashes with "ACCESS VIOLATION..." message box.

Can somebody check either it can be repro with latest vim windows
binaries ?

os: WinXP
VIM:
:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
MS-Windows 32 bit GUI version with OLE support
Compiled by Bram@KIBAALE
Big version with 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 +gettext/dyn
-hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap
+libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
+modify_fname +mouse +mouseshape
+multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -
osfiletype +path_extra +perl/dyn -postscript +printer -profile +python/
dyn +quickfix +reltime +rightleft
+ruby/dyn +scrollbind +signs +smartindent -sniff +statusline -
sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/
dyn -tgetent -termresponse +textobjects
+title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup -xfontset -xim -xterm_save +xpm_w32
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -
DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -
DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\
ObjGOLYTR/ /Ox -DNDEBUG -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -
DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -
DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\" -DDY
NAMIC_TCL_VER=\"8.3\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -
DDYNAMIC_PYTHON_DLL=\"python24.dll\" -DFEAT_PERL -DDYNAMIC_PERL -
DDYNAMIC_PERL_DLL=\"perl58.dll\" -DFEAT_RUBY -DDYNAMIC_RUB
Y -DDYNAMIC_RUBY_VER=18 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby18.dll\" -
DFEAT_BIG /Zi /Fd.\ObjGOLYTR/
Linking: link /RELEASE /nologo /subsystem:windows /incremental:no /
nodefaultlib:libc advapi32.lib shell32.lib gdi32.lib comdlg32.lib
ole32.lib uuid.lib oldnames.lib kernel32.lib
gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib
shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib
user32.lib /nodefaultlib:python24.lib e:\
tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -
debug

:help bufexplorer

Buffer Explorer *buffer-explorer*
*bufexplorer*
Version 7.1.7
...

Tony Mechelynck

unread,
Feb 26, 2008, 5:53:04 AM2/26/08
to vim...@googlegroups.com
haron wrote:
> I use BufExplore plugin intensively (http://www.vim.org/scripts/
> script.php?script_id=42), and have recently discover situation, when
> gvim crashes with it.
>
> 1. start cmd
> 2. c:
> 3. mkdir tst
> 4. cd tst
> 5. mkdir b
> 6. "c:\Program Files\Vim\vim71\gvim.exe" tmp-a.txt tmp-b.txt
> 7 :BufExplorer<CR>
> Now vim crashes with "ACCESS VIOLATION..." message box.
>
> Can somebody check either it can be repro with latest vim windows
> binaries ?
>
> os: WinXP
> VIM:
> :version
> VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
> MS-Windows 32 bit GUI version with OLE support
> Compiled by Bram@KIBAALE
> Big version with GUI. Features included (+) or not (-):

You can install a much more recent version than this yourself (7.1.262 as of
this writing), by downloading the installer from
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721

Although this page belongs to the "Cream (for Vim)" project, the installers on
it are actually for "plain-vanilla" vim and gvim compiled, albeit
"unofficially", from Bram's "official" sources and patches (click the
clipboard-like icon next to the version number if you want to see the
":version" listing).


Best regards,
Tony.
--
"My particular problem is with registry entries, which seem to just accumulate
like plastic coffee cups..." -- Paul Moore

haron

unread,
Feb 26, 2008, 7:10:28 AM2/26/08
to vim_use


On 26 Feb., 11:53, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> haron wrote:
> > I use BufExplore plugin intensively (http://www.vim.org/scripts/
> > script.php?script_id=42), and have recently discover situation, when
> > gvim crashes with it.
>
> > 1. start cmd
> > 2. c:
> > 3. mkdir tst
> > 4. cd tst
> > 5. mkdir b
> > 6. "c:\Program Files\Vim\vim71\gvim.exe" tmp-a.txt tmp-b.txt
> > 7 :BufExplorer<CR>
> > Now vim crashes with "ACCESS VIOLATION..." message box.
>
> > Can somebody check either it can be repro with latest vim windows
> > binaries ?
>
> > os: WinXP
> > VIM:
> > :version
> > VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
> > MS-Windows 32 bit GUI version with OLE support
> > Compiled by Bram@KIBAALE
> > Big version with GUI. Features included (+) or not (-):
>
> You can install a much more recent version than this yourself (7.1.262 as of
> this writing), by downloading the installer fromhttps://sourceforge.net/project/showfiles.php?group_id=43866&package_...
>
> Although this page belongs to the "Cream (for Vim)" project, the installers on
> it are actually for "plain-vanilla" vim and gvim compiled, albeit
> "unofficially", from Bram's "official" sources and patches (click the
> clipboard-like icon next to the version number if you want to see the
> ":version" listing).
>
> Best regards,
> Tony.
> --
> "My particular problem is with registry entries, which seem to just accumulate
> like plastic coffee cups..." -- Paul Moore

Thanks, Tony !

Now i have 7.1.262 installed, and its looks like crash is already
fixed in this version. But i still get error after
------------- quote begin
:BufExplore
Error detected while processing function
StartBufExplorer..<SNR>19_DisplayBufferList:
line 9:W10: Warning: Changing a readonly file
------------- quote end

Is it means:

a)bufexplorer.vim:247 (9-th line of (function s:DisplayBufferList()))
call setline(1, s:CreateHelp())

or

b)bufexplorer.vim:199 (9-th line of (function StartBufExplorer(open)))
if s:running == 1

?

PS: If i start vim from directory where no "b" directory present, no
errors happens.

Tony Mechelynck

unread,
Feb 26, 2008, 7:59:34 AM2/26/08
to vim...@googlegroups.com

I think it is this: the 9th line of the innermost function mentioned. I think
the "function" statement itself isn't counted; you ought to be able to check
it by typing

:func <SNR>19_DisplayBufferList

which will display the function text with line numbers.

>
> or
>
> b)bufexplorer.vim:199 (9-th line of (function StartBufExplorer(open)))
> if s:running == 1
>
> ?
>
> PS: If i start vim from directory where no "b" directory present, no
> errors happens.

Hm. Looks strange, but I'm not familiar with the BufExplorer code: when I need
to see the contents of a directory, I "edit" the directory, which invokes the
standard netrw plugin.


Best regards,
Tony.
--
SAGITTARIUS (Nov 22 - Dec 21)
You are optimistic and enthusiastic. You have a reckless
tendency to rely on luck since you lack talent. The majority
of Sagittarians are drunks or dope fiends or both. People
laugh at you a great deal.

haron

unread,
Feb 26, 2008, 5:22:15 PM2/26/08
to vim_use
I have created a function (as smallest possible code snippet still
reproducing my problem):

----------- quote begin
function ReproCrash(open)

let name = '[BufExplorer]'
"let name = '[DufExplorer]'

echo "name is:".name

exec "silent keepjumps drop"." ".name

setlocal modifiable

" call setline(1, "crash-buf")

endfunction
----------- quote end

and placed it into vimfiles/plugin/bufexplorer-reprocrash.vim
then, i use following sequence:

1. start cmd
2. c:
3. cd \
3. mkdir tst
4. cd tst
5. mkdir b
6. "c:\Program Files\Vim\vim71\gvim.exe" tmp-a.txt tmp-b.txt
7. :call ReproCrash("drop")

case ** A **)

with last line commented out (" call setline(1, "crash-buf")), i end
up with buffer named "c:\tst\b" instead of "[BufExplorer]" and
following content:
----------- quote begin
"
============================================================================

" Netrw Directory Listing
(netrw v110)

" C:/tst/b

" Sorted by name

" Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,
\.o$\.obj$,\.bak$

" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by
x:exec

"
============================================================================

../

./

.swp

----------- quote end

case ** B **)

with last line active ( call setline(1, "crash-buf")), i become an
error message:
----------- quote begin
name is:[BufExplorer]

Error detected while processing function ReproCrash:

line 11:W10: Warning: Changing a readonly file

Press ENTER or type command to continue

----------- quote end

and after pressing ENTER end up with buffer named again "c:\tst\b"
instead of "[BufExplorer]" and following content:
----------- quote begin
crash-buf

" Netrw Directory Listing
(netrw v110)

" C:/tst/b

" Sorted by name

" Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,
\.o$\.obj$,\.bak$

" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by
x:exec

"
============================================================================

../

./

.swp

----------- quote end

case ** C **)

With last line active (call setline(1, "crash-buf")) and name =
'[_D_ufExplorer]' (let name = '[DufExplorer]') i end up normally with
modified buffer named "[DufExplorer]" and following content:
----------- quote begin
crash-buf

----------- quote end

PS: Interesting, that cases ** A **), ** B **) works normally = gives
the same result as ** C **), if i insert between steps 5. mkdir b; and
6. "c:\pro...gvim.exe" tmp-a.txt tmp-b.txt; for example changing to
another directory then c:\tst, like: 5.1. cd b

Bram Moolenaar

unread,
Feb 27, 2008, 11:35:51 AM2/27/08
to haron, vim_use

Anton Sharonov wrote:

> I have created a function (as smallest possible code snippet still
> reproducing my problem):

I understand this happens with the original Vim 7.1, executable from the
Vim website? Does this still happen with a recent Vim?

haron

unread,
Feb 27, 2008, 2:43:45 PM2/27/08
to vim_use
All these cases

** A **)
** B **)
** C **)

are happening with 7.1.262 executable; installer comes from Cream
project as suggested by Toni. I would like to point out once more,
that gvim.exe itself _isn't_crashed_ any more after update to 7.1.262,
but strange "corruption" of buffer content (and properties ?
modifiable, readonly?) is happened.

Tony Mechelynck

unread,
Feb 27, 2008, 6:17:10 PM2/27/08
to vim...@googlegroups.com

I suspect an incompatibility beween BufExplorer and netrw.

- What is the output of the :scriptnames command? Copy it to the clipboard as
follows:

:redir @+
:scriptnames
:redir END

then you can paste it into your mailer.

- You may want to check the source of the BufExplorer plugin and of the
various netrw scripts, namely

$VIMRUNTIME/plugin/netrwPlugin.vim
$VIMRUNTIME/autoload/netrw.vim
$VIMRUNTIME/autoload/netrwSettings.vim
$VIMRUNTIME/autoload/netrwFileHandlers.vim

for user-commands or functions of "colliding" names, or competing autocommands
for a common event. (Vim will execute autocommands for a common event in the
order they were defined.)


Best regards,
Tony.
--
I see the eigenvalue in thine eye,
I hear the tender tensor in thy sigh.
Bernoulli would have been content to die
Had he but known such _a_-squared cos 2(phi)!
-- Stanislaw Lem, "Cyberiad"

haron

unread,
Feb 28, 2008, 3:17:32 AM2/28/08
to vim_use
On 28 Feb., 00:17, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> :redir @+
> :scriptnames
> :redir END

1: c:\Program Files\Vim\_vimrc
2: c:\Program Files\Vim\vim71\syntax\syntax.vim
3: c:\Program Files\Vim\vim71\syntax\synload.vim
4: c:\Program Files\Vim\vim71\syntax\syncolor.vim
5: c:\Program Files\Vim\vim71\filetype.vim
6: c:\Program Files\Vim\vim71\menu.vim
7: c:\Program Files\Vim\vim71\lang\menu_de.utf-8.vim
8: c:\Program Files\Vim\vim71\lang\menu_de_de.latin1.vim
9: c:\Program Files\Vim\vim71\autoload\paste.vim
10: c:\Program Files\Vim\vimfiles\colors\ps_color.vim
11: c:\Program Files\Vim\vim71\ftplugin.vim
12: c:\Program Files\Vim\vim71\indent.vim
13: c:\Program Files\Vim\vimfiles\compiler\msvc_ppqm.vim
14: c:\Program Files\Vim\vimfiles\keymap\russian-jcukenwin-de.vim
15: c:\Program Files\Vim\vimfiles\plugin\a.vim
16: c:\Program Files\Vim\vimfiles\plugin\AlignMaps.vim
17: c:\Program Files\Vim\vimfiles\plugin\AlignPlugin.vim
18: c:\Program Files\Vim\vimfiles\plugin\bufexplorer-reprocrash.vim
19: c:\Program Files\Vim\vimfiles\plugin\bufexplorer.vim
20: c:\Program Files\Vim\vimfiles\plugin\calendar.vim
21: c:\Program Files\Vim\vimfiles\plugin\cecutil.vim
22: c:\Program Files\Vim\vimfiles\plugin\ColorschemeDegrade.vim
23: c:\Program Files\Vim\vimfiles\plugin\fonts.vim
24: c:\Program Files\Vim\vimfiles\plugin\gtags.vim
25: c:\Program Files\Vim\vimfiles\plugin\haron_view_logs.vim
26: c:\Program Files\Vim\vimfiles\plugin\make-element.vim
27: c:\Program Files\Vim\vimfiles\plugin\matchit.vim
28: c:\Program Files\Vim\vimfiles\plugin\netrwPlugin.vim
29: c:\Program Files\Vim\vimfiles\plugin\opsplorer.vim
30: c:\Program Files\Vim\vimfiles\plugin\showmarks.vim
31: c:\Program Files\Vim\vimfiles\plugin\taglist.vim
32: c:\Program Files\Vim\vimfiles\plugin\themes.vim
33: c:\Program Files\Vim\vimfiles\plugin\vcscommand.vim
34: c:\Program Files\Vim\vimfiles\plugin\vcscvs.vim
35: c:\Program Files\Vim\vimfiles\plugin\vcsgit.vim
36: c:\Program Files\Vim\vimfiles\plugin\vcssvk.vim
37: c:\Program Files\Vim\vimfiles\plugin\vcssvn.vim
38: c:\Program Files\Vim\vimfiles\plugin\vimballPlugin.vim
39: c:\Program Files\Vim\vimfiles\plugin\visincr.vim
40: c:\Program Files\Vim\vimfiles\autoload\visincr.vim
41: c:\Program Files\Vim\vimfiles\plugin\visincrPlugin.vim
42: c:\Program Files\Vim\vim71\plugin\getscriptPlugin.vim
43: c:\Program Files\Vim\vim71\plugin\gzip.vim
44: c:\Program Files\Vim\vim71\plugin\matchparen.vim
45: c:\Program Files\Vim\vim71\plugin\netrw.vim
46: c:\Program Files\Vim\vimfiles\autoload\netrw.vim
47: c:\Program Files\Vim\vim71\plugin\netrwPlugin.vim
48: c:\Program Files\Vim\vim71\plugin\rrhelper.vim
49: c:\Program Files\Vim\vim71\plugin\spellfile.vim
50: c:\Program Files\Vim\vim71\plugin\tarPlugin.vim
51: c:\Program Files\Vim\vim71\plugin\tohtml.vim
52: c:\Program Files\Vim\vim71\plugin\vimballPlugin.vim
53: c:\Program Files\Vim\vim71\plugin\zipPlugin.vim
54: c:\Program Files\Vim\vim71\scripts.vim
55: c:\Program Files\Vim\vimfiles\syntax\netrw.vim
56: c:\Program Files\Vim\vim71\syntax\netrw.vim

> - You may want to check the source of the BufExplorer plugin and of the
> various netrw scripts, namely

Thank you very much for your help, i will try to investigate it in
more details later. Reports will follow.

Tony Mechelynck

unread,
Feb 28, 2008, 4:31:17 AM2/28/08
to vim...@googlegroups.com

I notice that you have a netrwPlugin.vim in $VIM/vimfiles/plugin. You may want
to remove it unless it is more recent than $VIMRUNTIME/plugin/netrwPlugin.vim,
which is regularly updated (the current edition is dated Aug 09, 2007 -- if
yours is older it is outdated). The same applies (possibly with different
dates) to $VIM/vimfiles/syntax/netrw.vim and, if you have them,
$VIM/vimfiles/autoload/netrw*.vim and $VIM/vimfiles/doc/pi_netrw.txt (and if
you remove the latter, don't help to do ":helptags $VIM/vimfiles/doc", without
the quotes of course.) (To remove them, you may want to use the ":RmVimball"
command, q.v.)

In any case, you should be aware (if you aren't yet) of the necessity of
keeping your runtime files up-to-date (which may have to be done separately
from the source, since most runtime file changes are not included in the
official patches). This runtime files upkeep can be done by several methods: I
know about ftp, rsync, cvs, aap, svn. I use rsync but I'm on Linux and I'm not
sure which method you'd prefer, taking into account the software installed on
your Windows machine.


Best regards,
Tony.
--
A baby is an alimentary canal with a loud voice at one end and no
responsibility at the other.

haron

unread,
Feb 29, 2008, 3:42:51 AM2/29/08
to vim_use
haron@notti /cygdrive/c/Program Files/Vim> find . -iname '*netrw*' |
grep -v '\.svn' | grep -v '/doc/' | xargs grep 'v[0-9][0-9][0-9]'
./vim71/autoload/netrw.vim:let g:loaded_netrw = "v121"
./vim71/plugin/netrw.vim:let g:loaded_netrw = "v110"
./vim71/plugin/netrwPlugin.vim:let g:loaded_netrwPlugin = "v121"
./vimfiles/autoload/netrw.vim:let g:loaded_netrw = "v121"
./vimfiles/plugin/netrwPlugin.vim:let g:loaded_netrwPlugin = "v121"

something strange happens - i have v110 (old?) netrw.vim in
$VIMRUNTIME/plugin. Ok, i remove it:

rm plugin/netrw.vim

, since anyway its looks like that "autoload/" dir is proper place for
netrw.vim. After that, i remove self-installed netrw from $VIM/
vimfiles/

svn rm vimfiles/autoload/netrw.vim
svn rm vimfiles/autoload/netrwFileHandlers.vim
svn rm vimfiles/autoload/netrwSettings.vim
svn rm vimfiles/doc/pi_netrw.txt
svn rm vimfiles/plugin/netrwPlugin.vim
svn rm vimfiles/syntax/netrw.vim
svn commit -m "removed netrw since distributed with vim now"

Finally, i remove bufexplore.vim as well.

rm vimfiles/plugin/bufexplorer.vim

Error message still persist after that. Of course, it's shows now
'(netrw v121)', so it is at least some progress :) .

Tony Mechelynck wrote:
> - You may want to check the source of the BufExplorer plugin and of the
> various netrw scripts, namely
> $VIMRUNTIME/plugin/netrwPlugin.vim
> $VIMRUNTIME/autoload/netrw.vim
> $VIMRUNTIME/autoload/netrwSettings.vim
> $VIMRUNTIME/autoload/netrwFileHandlers.vim

:vimgrep /autoc/ $VIMRUNTIME/**/*netrw*.vim

, but I don't see anything suspected from this first shot.

Than, i have tried to get list of all autocommands to examine it. But
redir @+
/ redir END seems not to work with :au output, isn't it ?

To be continued...

Tony Mechelynck

unread,
Feb 29, 2008, 1:22:41 PM2/29/08
to vim...@googlegroups.com
haron wrote:
[...]

> redir @+
> / redir END seems not to work with :au output, isn't it ?
[...]

It ought to work with any Vim command which displays info on the command-line
(the way ":echo" does it). Listing autocommands ought to work. But after
":redir END", you have to capture the clipboard contents before anything else
overwrites it.

You can also redirect to almost any other register, or to a file (creating,
overwriting or appending). See ":help :redir".


Best regards,
Tony.
--
There are three ways to get something done: do it yourself, hire
someone, or forbid your kids to do it.

haron

unread,
Feb 29, 2008, 4:14:58 PM2/29/08
to vim_use

On 28 фев, 00:17, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> - You may want to check the source of the BufExplorer plugin and of the
> various netrw scripts, namely
>
> $VIMRUNTIME/plugin/netrwPlugin.vim
> $VIMRUNTIME/autoload/netrw.vim
> $VIMRUNTIME/autoload/netrwSettings.vim
> $VIMRUNTIME/autoload/netrwFileHandlers.vim
>
> for user-commands or functions of "colliding" names, or competing autocommands
> for a common event. (Vim will execute autocommands for a common event in the
> order they were defined.)

I think I got it:

$ cd c:\tst
$ dir /s/b
c:\tst\b
c:\tst\c
$ gvim
:echo expand("[BufferExplorer]")
b
:echo expand("[CufferExplorer]")
c
:cd ..
:echo expand("[BufferExplorer]")
[BufferExplorer]
:echo expand("[CufferExplorer]")
[CufferExplorer]

is this normal ?

haron

unread,
Mar 1, 2008, 5:06:16 AM3/1/08
to vim_use
Thread is closed (subject isn't match any more).
I have started new thread:

http://groups.google.com/group/vim_use/browse_thread/thread/552ba1361e885013
"w32 gvim expand("[b...]") = "b" if current directory contains /b
folder"

to continue discussion with proper subject.
Reply all
Reply to author
Forward
0 new messages