Git GUI每次打开存储库时都会崩溃 [英] Git GUI crashes every time it opens a repository

查看:386
本文介绍了Git GUI每次打开存储库时都会崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于几天前,每当我在仓库中启动Git GUI时,它会显示这个可怕的错误消息,并在点击OK后退出:

  prepare-commit-msg hook failed:

0 [main] us 0 init_cheap:VirtualAlloc指针为空,Win32错误487
AllocationBase 0x0,BaseAddress 0x68560000,RegionSize 0x260000,状态0x10000
C:\程序文件(x86)\Git\bin\sh.exe:***无法为cygwin的堆保留空间,Win32错误0

您必须在提交之前纠正上述错误。

它只发生在Git GUI,只有在存储库(旧的或新创建的)中。 Git Bash中的常见命令包括提交工作正常。



使用较新的软件包(仅次要版本更改)取消安装和重新安装并没有删除此问题。它仍然发生在旧的存储库以及新创建的存储库中。



在一个干净的机器上,这个问题不会重现,所以我想这是我的盒子,但是我不记得安装任何有趣的事情。我记得很长时间后关闭了我的盒子,所以也许有些Windows Update可能触发了这一点 - 这也可以解释为什么其他机器不会受到损害 - 这是自上次Win更新以来的2-3个月。 p>

任何想法如何揭示这一点? (因为我只能在单机上看到,我不想把它提交给官方的跟踪器,我知道这不是我/其他应用程序的错误...)





更新第一条评论后:





  • 如果你删除或重命名钩子脚本,它是否工作?


    有趣的是,但是钩子脚本实际上根本不存在(没有钩子脚本是
    存在 - 在.git\hooks中只有* .sample文件)。甚至没有其他地方(git程序
    dir等)



  • 跟踪它,所以你知道它运行什么命令 - 从git-bash运行 git gui --trace


    输出任何东西到shell。行为是一样的。



  • 也许在那里得到gdb。


    我试过,但gdb没有输出任何有用的东西。但是,我没有任何经验
    与GDB,我可能做错了。我有一个 MinGW的gdb ,从命令
    提示符与git.exe一起运行参数,然后运行运行gui 。 gdb没有输出任何
    有趣的:

     (gdb)运行gui 
    启动程序:C: \\ Program Files(x86)\Git\bin\git.exe gu
    [新主题8264.0x1ce4]
    [新主题8264.0x394]
    [下载1(进程8264)退出代码01]
    (gdb)

    但我几乎肯定我在做它是错误的,所以建议是非常欢迎的:)



  • 确保你没有安装cygwin,或者至少在
    PATH中不存在


    我已经安装了cygwin(就像我一直有的,在git破坏之前) 。从Cygwin我只有
    在路径一些* .bat发射器和一些* .dll文件,但我已经检查与
    ProcMon它不触及他们,即使我从路径我删除它仍然得到
    同样的崩溃。



解决方案

和操作系统重新启动,问题消失了。



似乎更新中的一个引入了另一个修复的错误。或者它可以
是一个阶段的月球错误。



我想我们永远不会知道...


Since few days ago, every time I start Git GUI in a repository, it displays this horrifying error message and quits after I click OK:

prepare-commit-msg hook failed:

      0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x260000, State 0x10000
C:\Program Files (x86)\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

You must correct the above errors before committing.

It only happens with Git GUI and only when in repository (old or newly created one). Common commands in Git Bash including commit work fine.

Un-installing and re-installing with newer package (only minor version change) did not remove the issue. It still happens with old repositories as well as with newly created ones.

On a clean machine this issue does not reproduce, so I guess it's something on my box, but I don't remember installing anything funny. I do remember turning off my box after a long time though, so maybe some Windows Update could have triggered this--that would also explain why the other machine does not suffer--it's 2-3 months since last Win update there.

Any ideas how to shed light into this? (As I can only see it on single machine, I don't feel like submitting it to official tracker before I know it's not my/other app's fault...)


Update after first comments:

  • If you remove or rename the hook script, does it work?

    Funny enough, but the hook script actually does not exist at all (no hook scripts are present--there are only *.sample files in .git\hooks). Not even elsewhere (git program dir, etc.)

  • Trace it so you know what commands it ran - from git-bash run git gui --trace

    Sadly this does not output anything to the shell. Behaviour is the same.

  • Maybe get gdb in there.

    I tried but gdb did not output anything useful. However, I don't have any experience with GDB, I'm probably doing it wrong. I got a MinGW's gdb, ran it from command prompt with git.exe as argument and then ran run gui. gdb did not output anything interesting:

    (gdb) run gui
    Starting program: C:\Program Files (x86)\Git\bin\git.exe gu
    [New Thread 8264.0x1ce4]
    [New Thread 8264.0x394]
    [Inferior 1 (process 8264) exited with code 01]
    (gdb)  
    

    But I'm almost sure I'm Doing It Wrong, so advice is more than welcome :)

  • Make sure you don't have cygwin installed or at least that it is not present in your PATH at all

    I do have cygwin installed (as I always had, before git broke). From Cygwin I only have in path some *.bat launchers and some *.dll files, but I have checked with ProcMon that it does not touch them and even if I remove them from the path I still get the same crash.

解决方案

After another Windows Update and OS restart, the problem disappeared.

It seems like one of update introduced a bug which was fixed in another one. Or it could be a "phase-of-the-moon" bug.

I guess we'll never know...

这篇关于Git GUI每次打开存储库时都会崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆