I generally use vim + cscope on Linux, and it works great.

I have recently started using Cygwin on Windows 7, and I have been trying to replicate my development environment, with gvim and cscope. My initial attempt has been with Cygwin64, gvim7.4 (windows version), cscope 15.8a (64 bit).

I have noticed that even though gvim and cscope seem to work fine independently in my Cygwin environment, I seem to have problems with the integration, specifically with loading the cscope database in gvim.

Following is the error I observe:

Error detected while processing C:\Vim\vimfiles\plugin\cscope_maps.vim:
line   42:
E609: Cscope error:       1 [main] cscope 15920 child_copy: cygheap read 
copy failed, 0x180304408..0x1803126E8, done 0, windows pid 15920, Win32 
error 6    432 [main] cscope 15920 C:\cygwin64\usr\local\bin\cscope.exe: 
*** fatal error - ccalloc would have returned NULL

where line 42 refers to this line in the cscope_maps.vim plugin: "cs add cscope.out".

(This error is not seen if I do not have a cscope database in the directory.)

Size of the database does not seem to matter, it fails to load even a tiny database.

So far, I have tried the following:

  • Instead of using cscope from Cygwin, download, compile and install from the latest cscope source (version 15.8b) for 64 bit Cygwin
  • Uninstall older gvim 7.4 and install the latest gvim 8.0
  • Gvim was initially installed in C:\Program Files (x86)\Vim. Since I read that the spaces in path names could be an issue, uninstalled and reinstalled gvim in C:\Vim
  • As I noticed that gvim is a 32 bit executable while cscope was 64 bit, uninstalled cscope and installed the 32 bit version, and attempted to run everything from the 32 bit Cygwin environment

The last one gave me a similar error:

Error detected while processing C:\Vim\vimfiles\plugin\cscope_maps.vim:
line   42:
E609: Cscope error:       1 [main] cscope 6276 child_copy: cygheap read copy

Appreciate any insights.

  • 1
    have you tried with the Vim that comes with cygwin? – Christian Brabandt Aug 29 '17 at 5:26
  • Thanks for the tip, I installed vim through Cygwin and gave it a shot. It is able to load the cscope database and search symbols. I did not try installing gvim from Cygwin as I would like to avoid having to run startxwin first, which is why I had installed the Windows version. Perhaps I should try that gvim from Cygwin as well. For now, vim lets me go ahead, that's fine for me. – kman Aug 29 '17 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.