Very infrequently, our app is crashing because it receives SIGKILL. The circumstances are different, but the backtrace is always the same:
很少,我们的应用程序崩溃,因为它收到SIGKILL。情况不同,但回溯总是一样的:
#0 0x94a00afa in mach_msg_trap ()
#1 0x94a01267 in mach_msg ()
#2 0x00fa9d5c in _UIPasteboardServerContainsTypesAtIndex ()
#3 0x00faa9ae in UIPasteboardServerContainsTypesAtIndex ()
#4 0x00fa5417 in -[UIPasteboard containsPasteboardTypes:] ()
#5 0x00de4054 in -[UITextField canPerformAction:withSender:] ()
#6 0x087038a8 in -[UIResponder(UITextAccessibilityUtilities) _accessibilityHasTextOperations] ()
#7 0x08704df5 in -[UIAccessibilityTextFieldElement _accessibilityHasTextOperations] ()
#8 0x08791dcf in -[NSObject(AXPrivCategory) accessibilityAttributeValue:] ()
#9 0x0878a3b4 in _copyMultipleAttributeValuesCallback ()
#10 0x087c5c95 in _AXXMIGCopyMultipleAttributeValues ()
#11 0x087c0a6c in _XCopyMultipleAttributeValues ()
#12 0x087c8e66 in mshMIGPerform ()
#13 0x020cf1c5 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#14 0x02034022 in __CFRunLoopDoSource1 ()
#15 0x0203290a in __CFRunLoopRun ()
#16 0x02031db4 in CFRunLoopRunSpecific ()
#17 0x02031ccb in CFRunLoopRunInMode ()
#18 0x02a43879 in GSEventRunModal ()
#19 0x02a4393e in GSEventRun ()
#20 0x00d2ba9b in UIApplicationMain ()
#21 0x0000284d in main (argc=1, argv=0xbfffed44) at [myapp]/main.m:14
#22 0x000027c5 in start ()
How would I go about finding out what is causing this crash?
我怎样才能找出造成这次事故的原因?
1 个解决方案
#1
1
The SIGKILL is sent to apps for any kind of exceptions. Se we have to make an educated guess what the exception reason would be in this case. In the above case it looks like accessibility is checking for a certain kind of pasteboard type to be present.
SIGKILL被发送到应用程序以用于任何类型的例外。我们必须做出有根据的猜测,在这种情况下,异常原因是什么。在上面的例子中,看起来可访问性是检查某种类型的粘贴板类型是否存在。
Since this is happening in Apple code most likely this is a bug in iOS, because the containsPasteboardTypes: method should never throw an exception. Only possibly if the passed parameter is nil, but then the bug would lie in UIAccessibilityTextFieldElement which too is Apple's responsibility.
由于这在Apple代码中发生,因此很可能这是iOS中的错误,因为containsPasteboardTypes:方法永远不会抛出异常。只有当传递的参数为nil时才有可能,但是那个bug将存在于UIAccessibilityTextFieldElement中,这也是Apple的责任。
Long story short: you need to file a radar. As a workaround you can add an @try block around the offending operation. This would catch and ignore the exception.
长话短说:你需要提交雷达。作为一种解决方法,您可以在违规操作周围添加@try块。这将捕获并忽略该异常。
#1
1
The SIGKILL is sent to apps for any kind of exceptions. Se we have to make an educated guess what the exception reason would be in this case. In the above case it looks like accessibility is checking for a certain kind of pasteboard type to be present.
SIGKILL被发送到应用程序以用于任何类型的例外。我们必须做出有根据的猜测,在这种情况下,异常原因是什么。在上面的例子中,看起来可访问性是检查某种类型的粘贴板类型是否存在。
Since this is happening in Apple code most likely this is a bug in iOS, because the containsPasteboardTypes: method should never throw an exception. Only possibly if the passed parameter is nil, but then the bug would lie in UIAccessibilityTextFieldElement which too is Apple's responsibility.
由于这在Apple代码中发生,因此很可能这是iOS中的错误,因为containsPasteboardTypes:方法永远不会抛出异常。只有当传递的参数为nil时才有可能,但是那个bug将存在于UIAccessibilityTextFieldElement中,这也是Apple的责任。
Long story short: you need to file a radar. As a workaround you can add an @try block around the offending operation. This would catch and ignore the exception.
长话短说:你需要提交雷达。作为一种解决方法,您可以在违规操作周围添加@try块。这将捕获并忽略该异常。