Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Runtime Error with Vim Omnicompletion

I was trying to use Vim's omnicompletion with my Python code, but whenever I try C-x + C-o, it prompts the following error message:

Runtime Error!

Program E:\Vim\vim73\gvim.exe

R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.

Could anybody please tell me how to solve this problem! Many many thanks!

like image 701
nemo931102 Avatar asked Mar 19 '12 02:03

nemo931102


2 Answers

I had the same problem (Windows 7) and I could solve it by removing paths from my PATH variable that contain msvcr90.dll.

After removing several entries the error stopped popping up. Unfortunately I didn't make a note of which entries I removed. But It was C:\Program Files (x86)\OpenVPN\bin and several others including Windows Live.

I got the hint about looking for the problem in the path from here (bottom of the page): https://bitbucket.org/Haroogan/vim-youcompleteme-for-windows/src

like image 35
user334287 Avatar answered Nov 11 '22 00:11

user334287


I have the same issue which cause by gvim not able to load python pyd dll. There are some tips to solve the .pyd dll which cause the above issue. I'm not sure is there any way to solve the Runtime Error for all dll. Refere to Not embed the correct manifest for the msvc runtimes on windows link on how to solve your issue.

Update: Instead of updating manifest for the .pyd file. I tried to update manifest for gvim directly by updating the original gvim manifest with some changes from python.exe manifest.

# dump manifest from gvim.exe
>> mt.exe -inputresource:gvim.exe;#1 -out:gvim.manifest

# dump manifest from python.exe
# *I use python26 for gvim, default gvim come with python27
>> mt.exe -inputresource:c:\python26\python.exe;#1 -out:python.manifest

# manually edit gvim.manifest, just change the line with dependentAssembly with
# line from the python.manifest which will depend on VC90.CRT
# Then, update the edited manifest into gvim.exe
>> mt.exe -manifest gvim.manifest -outputresource:gvim.exe;1

Below are my edited gvim.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
  <assemblyIdentity processorArchitecture="*" version="7.3.0.0" type="win32" name="Vim"></assemblyIdentity>
  <description>Vi Improved - A Text Editor</description>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>

  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
</assembly>   
like image 73
sgwong513 Avatar answered Nov 11 '22 00:11

sgwong513