Git擴展:Win32錯誤487:無法爲cygwin的堆保留空間,Win32錯誤0

本文翻譯自:Git Extensions: Win32 error 487: Couldn't reserve space for cygwin's heap, Win32 error 0

Git Extensions: Everything was working fine until yesterday. Git擴展:直到昨天一切正常。

But suddenly I am get this error when I try to pull some repositories using git extensions 但是當我嘗試使用git extensions拉一些存儲庫時,突然出現了這個錯誤

C:\Program Files\Git\bin\git.exe pull --progress "origin" 
Done
    0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x390000, State 0x10000
C:\Program Files\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

It is happening for all the repositories which I have cloned. 我克隆的所有存儲庫都在發生這種情況。 But, my git bash is working fine. 但是,我的git bash運行正常。 I don't have any idea what is going on. 我不知道發生了什麼。 Any idea as to why this is happening? 知道爲什麼會這樣嗎?


#1樓

參考:https://stackoom.com/question/1FdTT/Git擴展-Win-錯誤-無法爲cygwin的堆保留空間-Win-錯誤


#2樓

Cygwin uses persistent shared memory sections, which can on occasion become corrupted. Cygwin使用永久共享內存部分,該部分有時可能會損壞。 The symptom of this is that some Cygwin programs begin to fail, but other applications are unaffected. 其症狀是某些Cygwin程序開始失敗,但其他應用程序不受影響。 Since these shared memory sections are persistent, often a system reboot is needed to clear them out before the problem can be resolved. 由於這些共享內存部分是持久性的,因此通常需要重新引導系統才能清除它們,然後才能解決問題。


#3樓

If a reboot does not correct the problem (as suggested by Greg Hegwill's answer) then check your PATH for conflicting installation(s) of the msys-1.0.dll (and possibly other related DLLs). 如果重新啓動不能解決問題(如Greg Hegwill的回答所建議),則請檢查您的PATH中是否存在與msys-1.0.dll(以及其他相關DLL)衝突的安裝。

In my particular situation MinGW's installation of msys has a copy of that DLL in its bin directory ( <MinGW_Install_Path>\\msys\\1.0\\bin ), and it was listed in the PATH. 在我的特定情況下,MinGW的msys安裝在其bin目錄( <MinGW_Install_Path>\\msys\\1.0\\bin )中具有該DLL的副本,並且該副本在PATH中列出。 Git's cmd directory was listed in the PATH, but its bin was not. Git的cmd目錄在PATH中列出,但其bin不在其中。 (Git's version of msys-1.0.dll is in the bin directory. Apparently the default installation of MSys-Git does not add its bin to the PATH.) (Git的msys-1.0.dll版本位於bin目錄中。顯然,MSys-Git的默認安裝不會將其bin添加到PATH。)

A temporary fix was to add Git's bin directory to the PATH so that it appears before MinGW's paths. 暫時的解決方法是將Git的bin目錄添加到PATH,以便它出現在MinGW的路徑之前。 (A more permanent fix will likely involve sorting out the path conflicts between MinGW's msys and Git's and/or removing the duplicate msys installations.) (一個更永久的修復程序可能涉及解決MinGW的msys與Git的路徑衝突和/或刪除重複的msys安裝。)


#4樓

I have seen the same error message after upgrading to git1.8.5.2: 升級到git1.8.5.2後,我看到了相同的錯誤消息:

Simply make a search for all msys-1.0.dll on your C:\\ drive, and make the one used by Git comes first. 只需在C:\\驅動器上搜索所有msys-1.0.dll ,然後讓Git使用的文件優先出現即可。

For instance, in my case I simply changed the order of: 例如,就我而言,我只是更改了以下順序:

C:\prgs\Gow\Gow-0.7.0\bin\msys-1.0.dll
C:\prgs\git\PortableGit-1.8.5.2-preview20131230\bin\msys-1.0.dll

By making the Git path C:\\prgs\\git\\PortableGit-1.8.5.2-preview20131230\\bin\\ come first in my %PATH% , the error message disappeared. 通過使Git路徑C:\\prgs\\git\\PortableGit-1.8.5.2-preview20131230\\bin\\首先出現在我的%PATH% ,錯誤消息消失了。

No need to reboot or to even change the DOS session. 無需重新啓動,甚至不需要更改DOS會話。
Once the %PATH% is updated in that DOS session, the git commands just work. 在該DOS會話中更新%PATH% ,git命令就可以使用了。


Note that carmbrester and Sixto Saez both report below (in the comments) having to reboot in order to fix the issue. 請注意, carmbresterSixto Saez均在下面的報告中(在評論中)必須重新啓動才能解決此問題。
Note: First, also removing any msys-1.0.dll , like one in %LOCALAPPDATA% 注意:首先,還要刪除所有msys-1.0.dll ,例如%LOCALAPPDATA%一個。


#5樓

I have encountered this issue witht he LPCEXpresso building.if you have the C:\\MinGW\\bin in the PATH. 如果您在PATH中有C:\\ MinGW \\ bin,則我在LPCEXpresso building中遇到了此問題。 somehow I had to remove it to get rid of this issue since some other MinGW like based too 我不得不刪除它以擺脫這個問題,因爲其他一些MinGW也基於


#6樓

I had the same problem. 我有同樣的問題。 I found solution here http://jakob.engbloms.se/archives/1403 我在這裏找到了解決方案http://jakob.engbloms.se/archives/1403

c:\msysgit\bin>rebase.exe -b 0x50000000 msys-1.0.dll

For me solution was slightly different. 對我而言,解決方案略有不同。 It was 它是

C:\Program Files (x86)\Git\bin>rebase.exe -b 0x50000000 msys-1.0.dll

Before you rebase dlls, you should make sure it is not in use: 在重新確定dll的基礎之前,應確保未使用它:

tasklist /m msys-1.0.dll

And make a backup: 進行備份:

copy msys-1.0.dll msys-1.0.dll.bak

If the rebase command fails with something like: 如果rebase命令失敗並顯示類似以下內容:

ReBaseImage (msys-1.0.dll) failed with last error = 6 ReBaseImage(msys-1.0.dll)失敗,最後一個錯誤= 6

You will need to perform the following steps in order: 您需要按順序執行以下步驟:

  1. Copy the dll to another directory 將dll複製到另一個目錄
  2. Rebase the copy using the commands above 使用上面的命令對副本進行重新設置
  3. Replace the original dll with the copy. 用副本替換原始dll。

If any issue run the commands as Administrator 如果有任何問題,請以管理員身份運行命令

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章