当前位置:  开发笔记 > 前端 > 正文

升级到10.12 Sierra后,Terminal.app在Mac OS X上崩溃

如何解决《升级到10.12Sierra后,Terminal.app在MacOSX上崩溃》经验,为你挑选了1个好方法。

将Mac OS X从El Capitan升级到Sierra(10.12.2)后,Terminal.app经常崩溃,每天数次.我将处于键入命令或编辑文件的过程中,它会崩溃.其他人看到这个问题或知道该怎么做(除了切换到iTerm 2)?

(编辑)这是堆栈跟踪(省略了拖尾加载的动态库以保持合理的长度):

Process:               Terminal [17579]
Path:                  /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
Identifier:            com.apple.Terminal
Version:               2.7.1 (388)
Build Info:            Terminal-388000000000000~2
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Terminal [17579]
User ID:               501

Date/Time:             2017-01-25 16:55:07.676 -0800
OS Version:            Mac OS X 10.12.2 (16C68)
Report Version:        12
Anonymous UUID:        XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Sleep/Wake UUID:       XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Time Awake Since Boot: 59000 seconds
Time Since Wake:       3700 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0:
--> 
    __TEXT                 00000001070d8000-00000001071a8000 [  832K] r-x/rwx SM=COW  /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_platform.dylib        0x00007fff9f916f56 _platform_memmove$VARIANT$Haswell + 182
1   com.apple.Terminal              0x0000000107110c4d 0x1070d8000 + 232525
2   com.apple.Terminal              0x000000010716ebb8 0x1070d8000 + 617400
3   com.apple.UIFoundation          0x00007fff9cd20b7f -[NSAttributedString(NSAttributedStringUIFoundationAdditions) doubleClickAtIndex:inRange:] + 337
4   com.apple.AppKit                0x00007fff882aa90e -[NSAttributedString(NSAttributedStringDeprecatedKitAdditions) URLAtIndex:effectiveRange:] + 607
5   com.apple.Terminal              0x000000010717c625 0x1070d8000 + 673317
6   com.apple.Terminal              0x0000000107147f81 0x1070d8000 + 458625
7   com.apple.Terminal              0x00000001071481e9 0x1070d8000 + 459241
8   com.apple.Terminal              0x000000010714ec1c 0x1070d8000 + 486428
9   com.apple.Foundation            0x00007fff8bc42f7f __NSFireTimer + 83
10  com.apple.CoreFoundation        0x00007fff8a1b7244 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
11  com.apple.CoreFoundation        0x00007fff8a1b6ecf __CFRunLoopDoTimer + 1071
12  com.apple.CoreFoundation        0x00007fff8a1b6a2a __CFRunLoopDoTimers + 298
13  com.apple.CoreFoundation        0x00007fff8a1ae3e1 __CFRunLoopRun + 2065
14  com.apple.CoreFoundation        0x00007fff8a1ad974 CFRunLoopRunSpecific + 420
15  com.apple.HIToolbox             0x00007fff89739acc RunCurrentEventLoopInMode + 240
16  com.apple.HIToolbox             0x00007fff89739901 ReceiveNextEventCommon + 432
17  com.apple.HIToolbox             0x00007fff89739736 _BlockUntilNextEventMatchingListInModeWithFilter + 71
18  com.apple.AppKit                0x00007fff87cdfae4 _DPSNextEvent + 1120
19  com.apple.AppKit                0x00007fff8845a21f -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
20  com.apple.AppKit                0x00007fff87cd4465 -[NSApplication run] + 926
21  com.apple.AppKit                0x00007fff87c9ed80 NSApplicationMain + 1237
22  libdyld.dylib                   0x00007fff9f706255 start + 1

Thread 1:: com.apple.terminal.low-disk-space-handler
0   libsystem_kernel.dylib          0x00007fff9f835e2a kevent + 10
1   com.apple.Terminal              0x00000001070da3df 0x1070d8000 + 9183
2   com.apple.Foundation            0x00007fff8bbd2c6d __NSThread__start__ + 1243
3   libsystem_pthread.dylib         0x00007fff9f91daab _pthread_body + 180
4   libsystem_pthread.dylib         0x00007fff9f91d9f7 _pthread_start + 286
5   libsystem_pthread.dylib         0x00007fff9f91d1fd thread_start + 13

Thread 2:: com.apple.terminal.sigchld-handler
0   libsystem_kernel.dylib          0x00007fff9f8362da read + 10
1   com.apple.Terminal              0x00000001070e4e03 0x1070d8000 + 52739
2   com.apple.Foundation            0x00007fff8bbd2c6d __NSThread__start__ + 1243
3   libsystem_pthread.dylib         0x00007fff9f91daab _pthread_body + 180
4   libsystem_pthread.dylib         0x00007fff9f91d9f7 _pthread_start + 286
5   libsystem_pthread.dylib         0x00007fff9f91d1fd thread_start + 13

Thread 3:: com.apple.terminal.tty-io
0   libsystem_kernel.dylib          0x00007fff9f834f4a __select + 10
1   com.apple.Terminal              0x00000001070e661b 0x1070d8000 + 58907
2   com.apple.Foundation            0x00007fff8bbd2c6d __NSThread__start__ + 1243
3   libsystem_pthread.dylib         0x00007fff9f91daab _pthread_body + 180
4   libsystem_pthread.dylib         0x00007fff9f91d9f7 _pthread_start + 286
5   libsystem_pthread.dylib         0x00007fff9f91d1fd thread_start + 13

Thread 4:: com.apple.NSEventThread
0   libsystem_kernel.dylib          0x00007fff9f82d38a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff9f82c7d7 mach_msg + 55
2   com.apple.CoreFoundation        0x00007fff8a1aec94 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation        0x00007fff8a1ae121 __CFRunLoopRun + 1361
4   com.apple.CoreFoundation        0x00007fff8a1ad974 CFRunLoopRunSpecific + 420
5   com.apple.AppKit                0x00007fff87e2cf92 _NSEventThread + 205
6   libsystem_pthread.dylib         0x00007fff9f91daab _pthread_body + 180
7   libsystem_pthread.dylib         0x00007fff9f91d9f7 _pthread_start + 286
8   libsystem_pthread.dylib         0x00007fff9f91d1fd thread_start + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 6:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 7:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 8:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 9:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 10:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 11:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d5fe _pthread_wqthread + 1023
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 12:
0   libsystem_kernel.dylib          0x00007fff9f8354e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff9f91d791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff9f91d1ed start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007fff58b24f0e  rbx: 0x0000610000672f80  rcx: 0x0000000000005ff2  rdx: 0x0000000000000002
  rdi: 0x00007fff58b24f0e  rsi: 0x0000000000000000  rbp: 0x00007fff58b24e70  rsp: 0x00007fff58b24e70
   r8: 0x0000000000000000   r9: 0x00007fff58b24e5c  r10: 0x00007f996715ca76  r11: 0x00007fff58b24f0e
  r12: 0x0000000000000018  r13: 0x0000000000000010  r14: 0x000000000000f136  r15: 0x000000000003e07d
  rip: 0x00007fff9f916f56  rfl: 0x0000000000010246  cr2: 0x0000000000000000

Logical CPU:     6
Error Code:      0x00000004
Trap Number:     14

Aaron McMill.. 8

这是Terminal.app中的一个错误,可能在10.12.4中修复

这里有很多细节:https://discussions.apple.com/thread/7778906

原因似乎与使用备用屏幕有关(超过您想知道的内容:http://www.shallowsky.com/linux/noaltscreen.html)

和换行.

我发现你可以通过这种方式可靠地触发崩溃:

    在alt屏幕(vim,屏幕等...)

    创建足够长的逻辑行以包裹到下一个物理行

    从行尾删除,直到它不再包装.

    紧急

目前的解决方法是从10.12.0或更早版本获取Terminal.app的副本.

似乎已经在10.12.1更新的Terminal.app 387中引入了这个问题.我从恢复分区(也出现在原始的10.12.0安装程序中)中提取了版本377,它可以很好地处理上述测试用例.

https://discussions.apple.com/message/31417760#message31417760



1> Aaron McMill..:

这是Terminal.app中的一个错误,可能在10.12.4中修复

这里有很多细节:https://discussions.apple.com/thread/7778906

原因似乎与使用备用屏幕有关(超过您想知道的内容:http://www.shallowsky.com/linux/noaltscreen.html)

和换行.

我发现你可以通过这种方式可靠地触发崩溃:

    在alt屏幕(vim,屏幕等...)

    创建足够长的逻辑行以包裹到下一个物理行

    从行尾删除,直到它不再包装.

    紧急

目前的解决方法是从10.12.0或更早版本获取Terminal.app的副本.

似乎已经在10.12.1更新的Terminal.app 387中引入了这个问题.我从恢复分区(也出现在原始的10.12.0安装程序中)中提取了版本377,它可以很好地处理上述测试用例.

https://discussions.apple.com/message/31417760#message31417760


不,它尚未修复.Mac OS 10.12.5仍然让Terminal.app一直在我身上崩溃几次,因为我使用Linux`screen`作为备用屏幕来保持我的SSH会话持久.
推荐阅读
echo7111436
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有