How can I find out why my app is getting SIGKILLed inside UIPasteboard?
Asked Answered
G

1

11

Very infrequently, our app is crashing because it receives SIGKILL. The circumstances are different, but the backtrace is always the same:

#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?

Ghoul answered 29/11, 2011 at 13:12 Comment(8)
Did you ever figure out what was causing this?Outermost
No. Haven't seen it in a while, though.Ghoul
Hah! Just got caught by it now. Serves me right :-)Ghoul
I just had this from my app running in the iOS simulator, with a very similar stack trace. It happened whilst performing a long press on a UITextField with text on the clipboard (but no selection at the time).Mercurochrome
So Simon are you closing the question ?Imco
Why would I close the question? It does still occasionally happen, and I don't know why.Ghoul
Please, specify what are the citcumstances. This looks like you are trying to paste a text into textField. Is that right? Does you app store anything in UIPasteboard?Anomaly
As I say in the question, the circumstances are different each time. It happens during my automated tests so I don't know exactly how it got to that state; it's not reliable so I can't watch for it.Ghoul
S
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.

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.

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.

Sailing answered 9/12, 2012 at 9:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.