更新到macOS Sierra后,git-gui
命令崩溃并出现错误:
Wish[23862:202062] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [0 nan]' *** First throw call stack: ( 0 CoreFoundation 0x00007fff8cd9252b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fffa146acad objc_exception_throw + 48 2 CoreFoundation 0x00007fff8ce10a0d +[NSException raise:format:] + 205 3 QuartzCore 0x00007fff92938980 _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152 4 QuartzCore 0x00007fff92938af5 -[CALayer setPosition:] + 44 5 QuartzCore 0x00007fff9293914b -[CALayer setFrame:] + 644 6 CoreUI 0x00007fff986e2112 _ZN20CUICoreThemeRenderer26MakeOrUpdateScrollBarLayerEPK13CUIDescriptoraPP7CALayer + 1284 7 CoreUI 0x00007fff986de317 _ZN20CUICoreThemeRenderer19CreateOrUpdateLayerEPK13CUIDescriptorPP7CALayer + 1755 8 CoreUI 0x00007fff986604d1 _ZN11CUIRenderer19CreateOrUpdateLayerEPK14__CFDictionaryPP7CALayer + 175 9 CoreUI 0x00007fff98663185 CUICreateOrUpdateLayer + 221 10 AppKit 0x00007fff8b3c7623 -[NSCompositeAppearance _callCoreUIWithBlock:options:] + 226 11 AppKit 0x00007fff8aa74a9d -[NSAppearance _createOrUpdateLayer:options:] + 76 12 AppKit 0x00007fff8aced143 -[NSScrollerImp _animateToRolloverState] + 274 13 AppKit 0x00007fff8acacb79 __49-[NSScrollerImp _installDelayedRolloverAnimation]_block_invoke + 673 14 AppKit 0x00007fff8ab73331 -[NSScrollerImp _doWork:] + 15 15 Foundation 0x00007fff8e770c88 __NSFireDelayedPerform + 417 16 CoreFoundation 0x00007fff8cd11e14 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 17 CoreFoundation 0x00007fff8cd11a9f __CFRunLoopDoTimer + 1071 18 CoreFoundation 0x00007fff8cd115fa __CFRunLoopDoTimers + 298 19 CoreFoundation 0x00007fff8cd09021 __CFRunLoopRun + 2065 20 CoreFoundation 0x00007fff8cd085b4 CFRunLoopRunSpecific + 420 21 Tcl 0x0000000101834b43 Tcl_WaitForEvent + 314 22 Tcl 0x00000001018045cd Tcl_DoOneEvent + 274 23 Tk 0x0000000101672f4f Tk_MainLoop + 33 24 Tk 0x000000010167ea5b Tk_MainEx + 1566 25 Wish 0x0000000101658542 Wish + 9538 26 libdyld.dylib 0x00007fffa1d48255 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException error: git-gui died of signal 6
有没有人有同样的问题和解决方案?
ssa*_*ahu 23
而不是使用默认的MacOS tcl-tk
,使用Homebrew中最新的tcl-tk(8.6.6),然后强制链接它,例如:
brew install tcl-tk
brew link tcl-tk --force
Run Code Online (Sandbox Code Playgroud)
Nai*_*wal 22
尝试:
git config --local --unset gui.geometry
由于Tk几何管理器不起作用,由于旧版本或它已损坏而发生此错误.
如果上述命令不起作用,请尝试更新您的xcode:
xcode-select --install
sbo*_*yev 18
MacOS Sierra上的Tk 8.5存在问题.你可以用Tk Wish 8.4取代Tk Wish 8.5
cp /System/Library/Frameworks/Tk.framework/Versions/8.4/Resources/Wish.app/Contents/MacOS/Wish /usr/local/Cellar/git/2.10.1/share/git-gui/lib/Git\ Gui.app/Contents/MacOS/
来源:https://github.com/git/git-scm.com/issues/853
UPD:注意cp
用你当前的版本替换路径中的git 版本
我的解决方案应该适用于https://git-scm.com/的git下载
brew install homebrew/dupes/tcl-tk
cd /usr/local/git/share/git-gui/lib/Git Gui.app/Contents/MacOS
并备份原始的愿望
cp /usr/local/Cellar/tcl-tk/8.6.6/bin/wish8.6 /usr/local/git/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish
我从这里收集了一堆答案,因为我通过以下方式使用 GIT和TCL brew
:
cd "/usr/local/Cellar/git/2.10.2/share/git-gui/lib/Git Gui.app/Contents/MacOS"
mv Wish Wish.bkp
ln -vs /usr/local/Cellar/tcl-tk/8.6.6/bin/wish8.6 Wish
随着时间的推移,版本号显然可能会有所不同
小智 5
我认为以下目标构成了问题的完整解决方案:
“轨道核弹”以简洁线性的方式解决这个问题的确定性
不要以传统 Apple Tcl/Tk 的丑陋字体结束
将您的 git gui 与 Apple 提供的 Tcl/Tk 分离
您将在下面找到实现此目标的分步说明:
从 Homebrew 获取重复的 Tcl/Tk
brew install tcl-tk
Run Code Online (Sandbox Code Playgroud)将未损坏的 Tcl/Tk 安装添加到损坏的 Apple 实现之前的路径中
the_platinum_searcher
提供pt
,其中冲突我推荐ripgrep来解决这个问题
brew link --force tcl-tk
Run Code Online (Sandbox Code Playgroud)通过重新安装未损坏的 Homebrew 版本来修复您的 gitk 安装
这可能不是必需的,但参考。上面提到的第一个目标
brew reinstall git
Run Code Online (Sandbox Code Playgroud)将 Homebrew Tcl/Tk 安装中的新 Wish 二进制文件复制到 Git Gui.app 捆绑包中来自 Apple 的损坏的捆绑文件中
这盲目地依赖于homebrew info <package>
不改变的输出
cp "$(which wish)" "$(brew info git | grep Cellar | cut -d' ' -f1)/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish"
Run Code Online (Sandbox Code Playgroud)最后一点可能是明智的做法,~/.bashrc
因为每次从 Homebrew 获得新的 git 版本时,都必须在您的和/或等价物中添加别名。
alias fix-gitgui='cp "$(which wish)" "$(brew info git | grep Cellar | cut -d" " -f1)/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish"'
Run Code Online (Sandbox Code Playgroud)
我不完全确定为什么上面使用的 cut 的字段分隔符的引用有效,因此请谨慎使用此别名,因为这很可能取决于确切的 bash 版本。
归档时间: |
|
查看次数: |
5982 次 |
最近记录: |