C-N , C-P causes crash

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

C-N , C-P causes crash

reckoner
Hi,

When I try to complete using C-N or C-P in insert mode, I routinely get
a crash. I just download the latest svn

    svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7

I have the following in my _vimrc:

    set complete+=s*.py
    set complete-=k complete+=k

Below is the error listing:

Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
violation reading location 0x0286c000.
First-chance exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
violation reading location 0x0286c004.
Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
violation reading location 0x0286c004.
First-chance exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
violation reading location 0x0286c000.
Unhandled exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
violation reading location 0x0286c000.
First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
violation writing location 0x0286c000.
Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
violation writing location 0x0286c000.
First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
violation writing location 0x0286c000.
The thread 'Win32 Thread' (0x1054) has exited with code 0 (0x0).
Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
violation writing location 0x0286c000.

and here is the call stack from VisualStudio 2008:

 > gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
flags=0)  Line 2280 + 0x18 bytes C
  gvim.exe!ins_compl_files(int count=40, unsigned char * *
files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
regmatch=0x0012f740, unsigned char * buf=0x0283a898, int *
dir=0x0012f730)  Line 3062 + 0x29 bytes C
  gvim.exe!ins_compl_dictionaries(unsigned char *
dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1, int
thesaurus=1)  Line 2964 + 0x21 bytes C
  gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 +
0xd2 bytes C
  gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
insert_match=1)  Line 4439 + 0xa bytes C
  gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
  gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
1348 + 0x9 bytes C
  gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
  gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes C
  gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
1188 + 0x12 bytes C
  gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb bytes C
  gvim.exe!VimMain()  Line 955 + 0x9 bytes C
  gvim.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
hPrevInst=0x00000000, char * lpszCmdLine=0x00222466, int nCmdShow=10)
Line 125 + 0xe bytes C
  gvim.exe!__tmainCRTStartup()  Line 263 + 0x2c bytes C
  gvim.exe!WinMainCRTStartup()  Line 182 C

any help appreciated.

Thanks!




--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Lech Lorens
On 25-May-2010 reckoner <[hidden email]> wrote:

> Hi,
>
> When I try to complete using C-N or C-P in insert mode, I routinely
> get a crash. I just download the latest svn
>
>    svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
>
> I have the following in my _vimrc:
>
>    set complete+=s*.py
>    set complete-=k complete+=k
>
> Below is the error listing:
>
> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> First-chance exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c004.
> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c004.
> First-chance exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> Unhandled exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> The thread 'Win32 Thread' (0x1054) has exited with code 0 (0x0).
> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
>
> and here is the call stack from VisualStudio 2008:
>
> > gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3,
> int len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1,
> int flags=0)  Line 2280 + 0x18 bytes C
>   gvim.exe!ins_compl_files(int count=40, unsigned char * *
> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int *
> dir=0x0012f730)  Line 3062 + 0x29 bytes C
>   gvim.exe!ins_compl_dictionaries(unsigned char *
> dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1,
> int thesaurus=1)  Line 2964 + 0x21 bytes C
>   gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 +
> 0xd2 bytes C
>   gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
> insert_match=1)  Line 4439 + 0xa bytes C
>   gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
>   gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
> 1348 + 0x9 bytes C
>   gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
> cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
>   gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes C
>   gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
> 1188 + 0x12 bytes C
>   gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb bytes C
>   gvim.exe!VimMain()  Line 955 + 0x9 bytes C
>   gvim.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
> hPrevInst=0x00000000, char * lpszCmdLine=0x00222466, int nCmdShow=10)
> Line 125 + 0xe bytes C
>   gvim.exe!__tmainCRTStartup()  Line 263 + 0x2c bytes C
>   gvim.exe!WinMainCRTStartup()  Line 182 C
>
> any help appreciated.

I'll be happy to help but I can't reproduce the problem. Would it be
possible for you to share your _vimrc, the file you edit while getting
the crash and the *.py files you use as your thesaurus files?

If not, can you simplify the procedure for getting the crash in such
a way that you can share the details?

Thanks!

--
Cheers,
Lech

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

reckoner
Lech:

Thanks for your reply. I'm attaching the _vimrc (sorry it's kind of messy).

The tricky part is that I can't reliably reproduce the error, even
though it happens consistently. In other words, I can't exactly
articulate a finite series of steps that lead to the crash other than I
keep doing <C-N> and <C-P> until it does happen. It seems like it
depends on the accumulation of a number of previous events before it
finally happens. Also, it doesn't seem to matter which python files are
being used. I have run into this problem before while editing many
different python files.

The only thing is that I recompiled the gvim binary using a new python
installation (Python version 2.6) using the PYTHON and PYTHON_VER flags
with DYNAMIC_PYTHON=no and using Visual Studio 2008. I then took the
existing vim installation (which is vim 7.2 from the installer) and then
simply replaced the gvim binary with the one I personally compiled for
Python version 2.6.

Thanks again. Any help appreciated.



On 5/25/2010 1:06 PM, Lech Lorens wrote:

> On 25-May-2010 reckoner<[hidden email]>  wrote:
>> Hi,
>>
>> When I try to complete using C-N or C-P in insert mode, I routinely
>> get a crash. I just download the latest svn
>>
>>     svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
>>
>> I have the following in my _vimrc:
>>
>>     set complete+=s*.py
>>     set complete-=k complete+=k
>>
>> Below is the error listing:
>>
>> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> First-chance exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c004.
>> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c004.
>> First-chance exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> Unhandled exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> The thread 'Win32 Thread' (0x1054) has exited with code 0 (0x0).
>> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>>
>> and here is the call stack from VisualStudio 2008:
>>
>>> gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3,
>> int len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1,
>> int flags=0)  Line 2280 + 0x18 bytes C
>>   gvim.exe!ins_compl_files(int count=40, unsigned char * *
>> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
>> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int *
>> dir=0x0012f730)  Line 3062 + 0x29 bytes C
>>   gvim.exe!ins_compl_dictionaries(unsigned char *
>> dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1,
>> int thesaurus=1)  Line 2964 + 0x21 bytes C
>>   gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 +
>> 0xd2 bytes C
>>   gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
>> insert_match=1)  Line 4439 + 0xa bytes C
>>   gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
>>   gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
>> 1348 + 0x9 bytes C
>>   gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
>> cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
>>   gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes C
>>   gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
>> 1188 + 0x12 bytes C
>>   gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb bytes C
>>   gvim.exe!VimMain()  Line 955 + 0x9 bytes C
>>   gvim.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
>> hPrevInst=0x00000000, char * lpszCmdLine=0x00222466, int nCmdShow=10)
>> Line 125 + 0xe bytes C
>>   gvim.exe!__tmainCRTStartup()  Line 263 + 0x2c bytes C
>>   gvim.exe!WinMainCRTStartup()  Line 182 C
>>
>> any help appreciated.
>
> I'll be happy to help but I can't reproduce the problem. Would it be
> possible for you to share your _vimrc, the file you edit while getting
> the crash and the *.py files you use as your thesaurus files?
>
> If not, can you simplify the procedure for getting the crash in such
> a way that you can share the details?
>
> Thanks!
>
--
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

_vimrc (14K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Tony Mechelynck
In reply to this post by reckoner
On 25/05/10 19:51, reckoner wrote:

> Hi,
>
> When I try to complete using C-N or C-P in insert mode, I routinely get
> a crash. I just download the latest svn
>
> svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
>
> I have the following in my _vimrc:
>
> set complete+=s*.py
> set complete-=k complete+=k
>
> Below is the error listing:
>
> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> First-chance exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c004.
> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c004.
> First-chance exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> Unhandled exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
> violation reading location 0x0286c000.
> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
> The thread 'Win32 Thread' (0x1054) has exited with code 0 (0x0).
> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
> violation writing location 0x0286c000.
>
> and here is the call stack from VisualStudio 2008:
>
>  > gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
> len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
> flags=0) Line 2280 + 0x18 bytes C
> gvim.exe!ins_compl_files(int count=40, unsigned char * *
> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int *
> dir=0x0012f730) Line 3062 + 0x29 bytes C
> gvim.exe!ins_compl_dictionaries(unsigned char * dict_start=0x0222d1fa,
> unsigned char * pat=0x028403e0, int flags=1, int thesaurus=1) Line 2964
> + 0x21 bytes C
> gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c) Line 4042 + 0xd2 bytes C
> gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
> insert_match=1) Line 4439 + 0xa bytes C
> gvim.exe!ins_complete(int c=14) Line 5072 + 0x21 bytes C
> gvim.exe!edit(int cmdchar=105, int startln=0, long count=1) Line 1348 +
> 0x9 bytes C
> gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int cmd=105,
> int startln=0) Line 8911 + 0x14 bytes C
> gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80) Line 8884 + 0x14 bytes C
> gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1) Line 1188
> + 0x12 bytes C
> gvim.exe!main_loop(int cmdwin=0, int noexmode=0) Line 1211 + 0xb bytes C
> gvim.exe!VimMain() Line 955 + 0x9 bytes C
> gvim.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
> hPrevInst=0x00000000, char * lpszCmdLine=0x00222466, int nCmdShow=10)
> Line 125 + 0xe bytes C
> gvim.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
> gvim.exe!WinMainCRTStartup() Line 182 C
>
> any help appreciated.
>
> Thanks!
>
>
>
>

When you type ":version" (without the quotes, but with Enter afterward),
what are the first lines of the reply, until and including the line
which ends with "Features included (+) or not (-):"? To capture the output:

        :redir @+
        :version
        :redir END

This copies the ":version" output to the sytem clmipboard, you can then
paste it into an email (you may remove many lines of gibberish after the
first handful, before you send).


Best regards,
Tony.
--
ARTHUR:  Be quiet!
DENNIS:  Well you can't expect to wield supreme executive power just 'cause
          some watery tart threw a sword at you!
ARTHUR:  Shut up!
DENNIS:  I mean, if I went around sayin' I was an empereror just because
some
          moistened bint had lobbed a scimitar at me they'd put me away!
                                   The Quest for the Holy Grail (Monty
Python)

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Lech Lorens
In reply to this post by reckoner
On 25-May-2010 reckoner <[hidden email]> wrote:

> Lech:
>
> Thanks for your reply. I'm attaching the _vimrc (sorry it's kind of messy).
>
> The tricky part is that I can't reliably reproduce the error, even
> though it happens consistently. In other words, I can't exactly
> articulate a finite series of steps that lead to the crash other than
> I keep doing <C-N> and <C-P> until it does happen. It seems like it
> depends on the accumulation of a number of previous events before it
> finally happens. Also, it doesn't seem to matter which python files
> are being used. I have run into this problem before while editing
> many different python files.
>
> The only thing is that I recompiled the gvim binary using a new
> python installation (Python version 2.6) using the PYTHON and
> PYTHON_VER flags
> with DYNAMIC_PYTHON=no and using Visual Studio 2008. I then took the
> existing vim installation (which is vim 7.2 from the installer) and
> then simply replaced the gvim binary with the one I personally
> compiled for Python version 2.6.
>
> Thanks again. Any help appreciated.

I can reproduce an invalid memory access for <C-X><C-T> and <C-X><C-K>,
but have no clue how to cause this for <C-N> or <C-P>.

Are you sure this happens when you do <C-N> or <C-P>? If so, please, do
your best to find the right steps to make the problem appear.

--
Cheers,
Lech

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

reckoner
In reply to this post by Tony Mechelynck
Tony:

see below:

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 16 2010 10:08:17)
MS-Windows 32-bit GUI version
Included patches: 1-394
Compiled by reckoner@DELL-reckoner
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
+float +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 +multi_lang
-mzscheme +netbeans_intg -ole -osfiletype +path_extra -perl -postscript
+printer -profile +python +quickfix +reltime +rightleft -ruby +scrollbind
+signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white -tcl -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  -I. -Iproto -DHAVE_PATHDEF -DWIN32
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG      -DWINVER=0x0400
-D_WIN32_WINNT=0x0400  /Fo.\ObjGY/ /Ox /GL -DNDEBUG  /Zl /MT
-DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON
-DFEAT_BIG /Fd.\ObjGY/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS
oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib
comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi32.lib
version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib
/machine:i386 /nodefaultlib libcmt.lib   user32.lib
c:\python26\libs\python26.lib    WSock32.lib  /PDB:gvim.pdb -debug


On 5/25/2010 2:00 PM, Tony Mechelynck wrote:

> On 25/05/10 19:51, reckoner wrote:
>> Hi,
>>
>> When I try to complete using C-N or C-P in insert mode, I routinely get
>> a crash. I just download the latest svn
>>
>> svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
>>
>> I have the following in my _vimrc:
>>
>> set complete+=s*.py
>> set complete-=k complete+=k
>>
>> Below is the error listing:
>>
>> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> First-chance exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c004.
>> Unhandled exception at 0x00547c75 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c004.
>> First-chance exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> Unhandled exception at 0x00547e25 in gvim.exe: 0xC0000005: Access
>> violation reading location 0x0286c000.
>> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> First-chance exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>> The thread 'Win32 Thread' (0x1054) has exited with code 0 (0x0).
>> Unhandled exception at 0x00547e37 in gvim.exe: 0xC0000005: Access
>> violation writing location 0x0286c000.
>>
>> and here is the call stack from VisualStudio 2008:
>>
>> > gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
>> len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
>> flags=0) Line 2280 + 0x18 bytes C
>> gvim.exe!ins_compl_files(int count=40, unsigned char * *
>> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
>> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int *
>> dir=0x0012f730) Line 3062 + 0x29 bytes C
>> gvim.exe!ins_compl_dictionaries(unsigned char * dict_start=0x0222d1fa,
>> unsigned char * pat=0x028403e0, int flags=1, int thesaurus=1) Line 2964
>> + 0x21 bytes C
>> gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c) Line 4042 + 0xd2
>> bytes C
>> gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
>> insert_match=1) Line 4439 + 0xa bytes C
>> gvim.exe!ins_complete(int c=14) Line 5072 + 0x21 bytes C
>> gvim.exe!edit(int cmdchar=105, int startln=0, long count=1) Line 1348 +
>> 0x9 bytes C
>> gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int cmd=105,
>> int startln=0) Line 8911 + 0x14 bytes C
>> gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80) Line 8884 + 0x14 bytes C
>> gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1) Line 1188
>> + 0x12 bytes C
>> gvim.exe!main_loop(int cmdwin=0, int noexmode=0) Line 1211 + 0xb bytes C
>> gvim.exe!VimMain() Line 955 + 0x9 bytes C
>> gvim.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
>> hPrevInst=0x00000000, char * lpszCmdLine=0x00222466, int nCmdShow=10)
>> Line 125 + 0xe bytes C
>> gvim.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
>> gvim.exe!WinMainCRTStartup() Line 182 C
>>
>> any help appreciated.
>>
>> Thanks!
>>
>>
>>
>>
>
> When you type ":version" (without the quotes, but with Enter afterward),
> what are the first lines of the reply, until and including the line
> which ends with "Features included (+) or not (-):"? To capture the output:
>
> :redir @+
> :version
> :redir END
>
> This copies the ":version" output to the sytem clmipboard, you can then
> paste it into an email (you may remove many lines of gibberish after the
> first handful, before you send).
>
>
> Best regards,
> Tony.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Dominique Pellé
In reply to this post by reckoner
reckoner wrote:

> Hi,
>
> When I try to complete using C-N or C-P in insert mode, I routinely get a
> crash. I just download the latest svn
...snip...

> and here is the call stack from VisualStudio 2008:
>
>>       gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
>> len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
>> flags=0)  Line 2280 + 0x18 bytes      C
>        gvim.exe!ins_compl_files(int count=40, unsigned char * *
> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int * dir=0x0012f730)
>  Line 3062 + 0x29 bytes        C
>        gvim.exe!ins_compl_dictionaries(unsigned char *
> dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1, int
> thesaurus=1)  Line 2964 + 0x21 bytes    C
>        gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 + 0xd2
> bytes      C
>        gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
> insert_match=1)  Line 4439 + 0xa bytes      C
>        gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
>        gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
> 1348 + 0x9 bytes      C
>        gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
> cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
>        gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes
>   C
>        gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
> 1188 + 0x12 bytes   C
>        gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb
> bytes C
>        gvim.exe!VimMain()  Line 955 + 0x9 bytes        C

I can also reproduce an invalid read & write memory access with Vim-7.3a
(271a5907f944) with the thesaurus completion & 'infercase'. It happens
when the word typed is longer than a completion match. Error is in the
same function as where crash was reported: ins_compl_add_infercase().

==8665== Invalid read of size 4
==8665==    at 0x8067252: ins_compl_add_infercase (edit.c:2282)
==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
==8665==    by 0x8065CAC: edit (edit.c:1348)
==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
==8665==    by 0x812FE60: nv_edit (normal.c:8885)
==8665==    by 0x8123AB7: normal_cmd (normal.c:1188)
==8665==    by 0x80E71DC: main_loop (main.c:1216)
==8665==    by 0x80E6CD3: main (main.c:960)
==8665==  Address 0x4fe53dc is 0 bytes after a block of size 12 alloc'd
==8665==    at 0x4024F70: malloc (vg_replace_malloc.c:236)
==8665==    by 0x81144F6: lalloc (misc2.c:919)
==8665==    by 0x8114413: alloc (misc2.c:818)
==8665==    by 0x8066FBD: ins_compl_add_infercase (edit.c:2208)
==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
==8665==    by 0x8065CAC: edit (edit.c:1348)
==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
==8665==    by 0x812FE60: nv_edit (normal.c:8885)
(more errors after that)

Steps to reproduce:

1) Download a thesaurus file:

  $ wget http://www.gutenberg.org/dirs/etext02/mthes10.zip
  $ unzip mthes10.zip
  Archive:  mthes10.zip
    inflating: aaREADME.txt
    inflating: roget13a.txt
    inflating: mthesaur.txt

2) Run:

  $ valgrind vim -u NONE --noplugin \
    -c 'set infercase ignorecase thesaurus=mthesaur.txt' \
    -c 'call feedkeys("iEXAMPLE\<c-x>\<c-t>")' 2> vg.log

3) Observe errors in vg.log

Attached patch fixes it.

-- Dominique

--
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

fixed-inv_mem_access_thesaurus-edit.c-7.3a.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

reckoner
Thanks. Can I use this with vim72 from SVN or do I have to get vim7.3?

Cheers!



On 5/26/2010 9:32 AM, Dominique Pellé wrote:

> reckoner wrote:
>
>> Hi,
>>
>> When I try to complete using C-N or C-P in insert mode, I routinely get a
>> crash. I just download the latest svn
> ...snip...
>> and here is the call stack from VisualStudio 2008:
>>
>>>        gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
>>> len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
>>> flags=0)  Line 2280 + 0x18 bytes      C
>>         gvim.exe!ins_compl_files(int count=40, unsigned char * *
>> files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
>> regmatch=0x0012f740, unsigned char * buf=0x0283a898, int * dir=0x0012f730)
>>   Line 3062 + 0x29 bytes        C
>>         gvim.exe!ins_compl_dictionaries(unsigned char *
>> dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1, int
>> thesaurus=1)  Line 2964 + 0x21 bytes    C
>>         gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 + 0xd2
>> bytes      C
>>         gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
>> insert_match=1)  Line 4439 + 0xa bytes      C
>>         gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
>>         gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
>> 1348 + 0x9 bytes      C
>>         gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
>> cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
>>         gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes
>>    C
>>         gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
>> 1188 + 0x12 bytes   C
>>         gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb
>> bytes C
>>         gvim.exe!VimMain()  Line 955 + 0x9 bytes        C
>
>
> I can also reproduce an invalid read&  write memory access with Vim-7.3a
> (271a5907f944) with the thesaurus completion&  'infercase'. It happens
> when the word typed is longer than a completion match. Error is in the
> same function as where crash was reported: ins_compl_add_infercase().
>
> ==8665== Invalid read of size 4
> ==8665==    at 0x8067252: ins_compl_add_infercase (edit.c:2282)
> ==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
> ==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
> ==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
> ==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
> ==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
> ==8665==    by 0x8065CAC: edit (edit.c:1348)
> ==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
> ==8665==    by 0x812FE60: nv_edit (normal.c:8885)
> ==8665==    by 0x8123AB7: normal_cmd (normal.c:1188)
> ==8665==    by 0x80E71DC: main_loop (main.c:1216)
> ==8665==    by 0x80E6CD3: main (main.c:960)
> ==8665==  Address 0x4fe53dc is 0 bytes after a block of size 12 alloc'd
> ==8665==    at 0x4024F70: malloc (vg_replace_malloc.c:236)
> ==8665==    by 0x81144F6: lalloc (misc2.c:919)
> ==8665==    by 0x8114413: alloc (misc2.c:818)
> ==8665==    by 0x8066FBD: ins_compl_add_infercase (edit.c:2208)
> ==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
> ==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
> ==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
> ==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
> ==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
> ==8665==    by 0x8065CAC: edit (edit.c:1348)
> ==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
> ==8665==    by 0x812FE60: nv_edit (normal.c:8885)
> (more errors after that)
>
> Steps to reproduce:
>
> 1) Download a thesaurus file:
>
>    $ wget http://www.gutenberg.org/dirs/etext02/mthes10.zip
>    $ unzip mthes10.zip
>    Archive:  mthes10.zip
>      inflating: aaREADME.txt
>      inflating: roget13a.txt
>      inflating: mthesaur.txt
>
> 2) Run:
>
>    $ valgrind vim -u NONE --noplugin \
>      -c 'set infercase ignorecase thesaurus=mthesaur.txt' \
>      -c 'call feedkeys("iEXAMPLE\<c-x>\<c-t>")' 2>  vg.log
>
> 3) Observe errors in vg.log
>
> Attached patch fixes it.
>
> -- Dominique

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Dominique Pellé
reckoner wrote:

> Thanks. Can I use this with vim72 from SVN or do I have to get vim7.3?
>
> Cheers!

The function ins_compl_add_infercase() has not changed from vim72
to vim73 so patch should work in vim72 from subversion as well.

You may want to start using mercurial anyway rather than subversion,
since mercurial is now the revision control system used for Vim
development.

See: http://www.vim.org/mercurial.php

-- Dominique

--
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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

Bram Moolenaar
In reply to this post by Dominique Pellé

Dominique Pelle wrote:

> reckoner wrote:
>
> > Hi,
> >
> > When I try to complete using C-N or C-P in insert mode, I routinely get a
> > crash. I just download the latest svn
> ...snip...
> > and here is the call stack from VisualStudio 2008:
> >
> >>       gvim.exe!ins_compl_add_infercase(unsigned char * str=0x0283a8d3, int
> >> len=1, int icase=1, unsigned char * fname=0x0285c118, int dir=1, int
> >> flags=0)  Line 2280 + 0x18 bytes      C
> >        gvim.exe!ins_compl_files(int count=40, unsigned char * *
> > files=0x0285c1d0, int thesaurus=1, int flags=1, regmatch_T *
> > regmatch=0x0012f740, unsigned char * buf=0x0283a898, int * dir=0x0012f730)
> >  Line 3062 + 0x29 bytes        C
> >        gvim.exe!ins_compl_dictionaries(unsigned char *
> > dict_start=0x0222d1fa, unsigned char * pat=0x028403e0, int flags=1, int
> > thesaurus=1)  Line 2964 + 0x21 bytes    C
> >        gvim.exe!ins_compl_get_exp(pos_T * ini=0x007d6c0c)  Line 4042 + 0xd2
> > bytes      C
> >        gvim.exe!ins_compl_next(int allow_get_expansion=1, int count=1, int
> > insert_match=1)  Line 4439 + 0xa bytes      C
> >        gvim.exe!ins_complete(int c=14)  Line 5072 + 0x21 bytes C
> >        gvim.exe!edit(int cmdchar=105, int startln=0, long count=1)  Line
> > 1348 + 0x9 bytes      C
> >        gvim.exe!invoke_edit(cmdarg_S * cap=0x0012fb80, int repl=0, int
> > cmd=105, int startln=0)  Line 8911 + 0x14 bytes C
> >        gvim.exe!nv_edit(cmdarg_S * cap=0x0012fb80)  Line 8884 + 0x14 bytes
> >   C
> >        gvim.exe!normal_cmd(oparg_S * oap=0x0012fc1c, int toplevel=1)  Line
> > 1188 + 0x12 bytes   C
> >        gvim.exe!main_loop(int cmdwin=0, int noexmode=0)  Line 1211 + 0xb
> > bytes C
> >        gvim.exe!VimMain()  Line 955 + 0x9 bytes        C
>
>
> I can also reproduce an invalid read & write memory access with Vim-7.3a
> (271a5907f944) with the thesaurus completion & 'infercase'. It happens
> when the word typed is longer than a completion match. Error is in the
> same function as where crash was reported: ins_compl_add_infercase().
>
> ==8665== Invalid read of size 4
> ==8665==    at 0x8067252: ins_compl_add_infercase (edit.c:2282)
> ==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
> ==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
> ==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
> ==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
> ==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
> ==8665==    by 0x8065CAC: edit (edit.c:1348)
> ==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
> ==8665==    by 0x812FE60: nv_edit (normal.c:8885)
> ==8665==    by 0x8123AB7: normal_cmd (normal.c:1188)
> ==8665==    by 0x80E71DC: main_loop (main.c:1216)
> ==8665==    by 0x80E6CD3: main (main.c:960)
> ==8665==  Address 0x4fe53dc is 0 bytes after a block of size 12 alloc'd
> ==8665==    at 0x4024F70: malloc (vg_replace_malloc.c:236)
> ==8665==    by 0x81144F6: lalloc (misc2.c:919)
> ==8665==    by 0x8114413: alloc (misc2.c:818)
> ==8665==    by 0x8066FBD: ins_compl_add_infercase (edit.c:2208)
> ==8665==    by 0x80684DF: ins_compl_files (edit.c:3060)
> ==8665==    by 0x8068252: ins_compl_dictionaries (edit.c:2963)
> ==8665==    by 0x8069DA8: ins_compl_get_exp (edit.c:4031)
> ==8665==    by 0x806A993: ins_compl_next (edit.c:4439)
> ==8665==    by 0x806BBDB: ins_complete (edit.c:5072)
> ==8665==    by 0x8065CAC: edit (edit.c:1348)
> ==8665==    by 0x812FEBA: invoke_edit (normal.c:8912)
> ==8665==    by 0x812FE60: nv_edit (normal.c:8885)
> (more errors after that)
>
> Steps to reproduce:
>
> 1) Download a thesaurus file:
>
>   $ wget http://www.gutenberg.org/dirs/etext02/mthes10.zip
>   $ unzip mthes10.zip
>   Archive:  mthes10.zip
>     inflating: aaREADME.txt
>     inflating: roget13a.txt
>     inflating: mthesaur.txt
>
> 2) Run:
>
>   $ valgrind vim -u NONE --noplugin \
>     -c 'set infercase ignorecase thesaurus=mthesaur.txt' \
>     -c 'call feedkeys("iEXAMPLE\<c-x>\<c-t>")' 2> vg.log
>
> 3) Observe errors in vg.log
>
> Attached patch fixes it.

Great, thanks.

If I keep getting patches like this I may be able to take a weekend off!
:-)

--
hundred-and-one symptoms of being an internet addict:
94. Now admit it... How many of you have made "modem noises" into
    the phone just to see if it was possible? :-)

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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
Reply | Threaded
Open this post in threaded view
|

Re: C-N , C-P causes crash

reckoner
In reply to this post by Dominique Pellé
Dominique:

I tested this. It works!

Thank you *very* much. I have been struggling with this ever since I
switched to version 7.2.

On 5/26/2010 9:32 AM, Dominique Pellé wrote:
> vim -u NONE --noplugin \
>      -c 'set infercase ignorecase thesaurus=mthesaur.txt' \
>      -c 'call feedkeys("iEXAMPLE\<c-x>\<c-t>")'

--
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