摇晃以撤销崩溃(Shake Undo)

崩溃堆栈信息:

-[NSTextStorage(UIKitUndoExtensions) _undoRedoAttributedSubstringFromRange:] + 156

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x0000000000000000
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSBigMutableString substringWithRange:]: Range {0, 61} out of bounds; string length 10
UserInfo:(null)'

Thread 0 Crashed:
0   CoreFoundation                  __exceptionPreprocess + 124
1   libobjc.A.dylib                 objc_exception_throw + 56
2   CoreFoundation                  -[NSException initWithCoder:] + 0
3   Foundation                      -[NSString substringWithRange:] + 140
4   UIKit                           -[NSTextStorage(UIKitUndoExtensions) _undoRedoAttributedSubstringFromRange:] + 156
5   UIKit                           -[_UITextUndoOperationReplace undoRedo] + 320
6   Foundation                      -[_NSUndoStack popAndInvoke] + 280
7   Foundation                      -[NSUndoManager undoNestedGroup] + 416
8   UIKit                           __58-[UIApplication _showEditAlertViewWithUndoManager:window:]_block_invoke.2492 + 32
9   UIKit                           -[UIAlertController _invokeHandlersForAction:] + 108
10  UIKit                           __103-[UIAlertController _dismissAnimated:triggeringAction:triggeredByPopoverDimmingView:dismissCompletion:]_block_invoke.459 + 28
11  UIKit                           -[UIPresentationController transitionDidFinish:] + 1320
12  UIKit                           __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2 + 188
13  UIKit                           -[_UIViewControllerTransitionContext completeTransition:] + 116
14  UIKit                           -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 764
15  UIKit                           -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
16  UIKit                           -[UIViewAnimationState animationDidStop:finished:] + 296
17  UIKit                           -[UIViewAnimationState animationDidStop:finished:] + 456
18  QuartzCore                      CA::Layer::run_animation_callbacks(void*) + 284

复现步骤:

  • 头条 V6.6.5
头条V6.6.5.gif
  • 微信V6.6.6
微信V6.6.6.gif
  • QQV7.5.8.422
QQV7.5.8.422.gif

修复方式

UIApplicationapplicationSupportsShakeToEdit属性关掉即可。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 转自http://www.raywenderlich.com/zh-hans/30818/ios应用崩溃日志揭秘 ...
    RunSnails阅读 4,474评论 2 22
  • feisky云计算、虚拟化与Linux技术笔记posts - 1014, comments - 298, trac...
    不排版阅读 3,926评论 0 5
  • 当一个应用崩溃时,会产生一个崩溃报告。这个报告对分析崩溃问题是非常有用的。这篇文章主要讲述了如何符号化、了解和分析...
    alvin_wang阅读 3,878评论 1 6
  • 实现客户端或者可以连续输入多次和读多次 在一个线程中进行读写操作,你需要不断的读和不断的写(也就是死循环嵌套读和写...
    孙浩j阅读 177评论 0 0
  • 2017年6月24日 星期六 晴 今天下午,我、妈妈、哥哥、爸爸、表哥、表姐,一起去九龙江水仙花大桥游泳...
    曾博韬阅读 206评论 0 0