Send gestures event cause crash when a wkwebview dealloced on iOS14 - ios

In my app,push to a view controller contains wkwebview and use long press gesture to show the select text menu,then pop the view controller make web view to dealloc.And then push to another web view controller,send a gesture to webview,then crashed.It's occurd on iOS 14 beta 2.I have report the bug to apple.It's exist some way workround?
Date/Time: 2020-07-13 18:46:00.715 +0800
OS Version: Mac OS X 10.15.5 (19F101)
Report Version: 12
Bridge OS Version: 4.5 (17P5300)
Anonymous UUID: DC589A65-FAD9-1105-69E1-F841F6FEE2E3
Sleep/Wake UUID: D3E2CB0D-6218-4CC0-85C5-86C8DAE0B4BC
Time Awake Since Boot: 240000 seconds
Time Since Wake: 33000 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 0x0000000000000022
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [50050]
VM Regions Near 0x22:
-->
__TEXT 000000010f792000-000000010f796000 [ 16K] r-x/r-x SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/4CDD359F-0A7E-4E13-A2CE-0DA825D90269/data/Containers/Bundle/Application/D19A53D4-CA61-4FCA-9F2D-ECAEA1A0D9C3/TestWebView.app/TestWebView
Application Specific Information:
CoreSimulator 725.10 - Device: iPhone 8 (4CDD359F-0A7E-4E13-A2CE-0DA825D90269) - Runtime: iOS 14.0 (18A5319g) - DeviceType: iPhone 8
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x0000000110d38b88 objc_retain + 8
1 com.apple.UIKitCore 0x00000001219ec716 -[UIInputResponderController prepareToMoveKeyboardForInputViewSet:animationStyle:] + 348
2 com.apple.UIKitCore 0x00000001219eacdf -[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:] + 623
3 com.apple.UIKitCore 0x00000001219eaa45 -[UIInputResponderController setInputViews:animationStyle:] + 200
4 com.apple.UIKitCore 0x00000001219ec000 -[UIInputResponderController setInputViews:animated:] + 88
5 com.apple.UIKitCore 0x00000001219ec067 -[UIInputResponderController setInputViews:] + 68
6 com.apple.UIKitCore 0x00000001219e98a9 __74-[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]_block_invoke.605 + 30
7 com.apple.UIKitCore 0x00000001219e94b2 -[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:] + 3982
8 com.apple.UIKitCore 0x00000001219e8507 -[UIInputResponderController _reloadInputViewsForResponder:] + 148
9 com.apple.UIKitCore 0x0000000121fdb741 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 133
10 com.apple.UIKitCore 0x0000000121fd6af9 -[UIResponder becomeFirstResponder] + 806
11 com.apple.UIKitCore 0x00000001224df189 -[UIView(Hierarchy) becomeFirstResponder] + 145
12 com.apple.WebKit 0x000000010fed7f9c -[WKContentView(WKInteraction) becomeFirstResponderForWebView] + 136
13 com.apple.WebKit 0x000000010fac30c8 -[WKWebView(WKViewInternalIOS) becomeFirstResponder] + 133
14 com.apple.UIKitCore 0x00000001222870b7 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessaryActivatingSelection:] + 195
15 com.apple.UIKitCore 0x00000001222881e7 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) checkEditabilityAndSetFirstResponderIfNecessary] + 376
16 com.apple.UIKitCore 0x0000000122257e63 -[UITextIndirectNonEditableInteraction willBeginGesture] + 128
17 com.apple.UIKitCore 0x0000000121e16573 -[_UIKeyboardBasedNonEditableTextSelectionInteraction oneFingerForcePan:] + 1339
18 com.apple.UIKitCore 0x0000000121aed683 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 49
19 com.apple.UIKitCore 0x0000000121af7904 _UIGestureRecognizerSendTargetActions + 100
20 com.apple.UIKitCore 0x0000000121af41cb _UIGestureRecognizerSendActions + 294
21 com.apple.UIKitCore 0x0000000121af352a -[UIGestureRecognizer _updateGestureForActiveEvents] + 725
22 com.apple.UIKitCore 0x0000000121ae5a72 _UIGestureEnvironmentUpdate + 2652
23 com.apple.CoreFoundation 0x0000000110dfc277 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 com.apple.CoreFoundation 0x0000000110df6dae __CFRunLoopDoObservers + 487
25 com.apple.CoreFoundation 0x0000000110df72df __CFRunLoopRun + 1137
26 com.apple.CoreFoundation 0x0000000110df6aba CFRunLoopRunSpecific + 538
27 com.apple.GraphicsServices 0x00000001139fcdb3 GSEventRunModal + 139
28 com.apple.UIKitCore 0x0000000121fa27fe -[UIApplication _run] + 912
29 com.apple.UIKitCore 0x0000000121fa7e1e UIApplicationMain + 1570
30 jkl.TestWebView 0x000000010f793fa2 main + 114 (main.m:17)
31 libdyld.dylib 0x0000000119d4395d start + 1
Thread 1:

I met the same problem.
It seems -[UIInputViewSet restorableResponder] returns a wild pointer. This property is neither weak nor strong.
I added a symbol breakpoint to -[UIInputViewSet restorableResponder] and -[UIInputViewSet setRestorableResponder:], the assembly code shows they have neither store_weak nor store_strong code.
I used a workaround, hook -[UIInputViewSet restorableResponder] and return nil. Maybe it will cause another problem. But after testing it seems work well.

Related

Xamarin.Forms iOS application crash on release after SplashScreen

I have a very bad issue right now:
Behavior:
Application work when debug, but in release exit when app start.
The debugg information is not clear for the reason the application fail only in release mode.
Visual Studio 2019
Xamarin Forms 4.8.0.1821
ZxIng.Net.Mobile 2.4.1
ZxIng.Net.Mobile.Forms 2.4.1
Newtonsoft.Json 12.0.3
Xamarin.Essentials 1.6.1
SDK 14.4
Simulator log file:
Process: myapp-ui.iOS [19566]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/2C19C42D-564E-42CB-B805-C9C49BB1E8FD/data/Containers/Bundle/Application/1F644647-27DB-48EF-96D6-75A169AE4E9D/myapp-ui.iOS.app/myapp-ui.iOS
Identifier: myapp-ui.iOS
Version: 2.0.3 (1610484945)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [17405]
Responsible: SimulatorTrampoline [1267]
User ID: 501
Date/Time: 2021-02-16 12:29:44.629 -0600
OS Version: macOS 11.2.1 (20D74)
Report Version: 12
Anonymous UUID: E13D7872-1C1C-3306-5557-E45B4D68317D
Time Awake Since Boot: 350000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 tid_307 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
CoreSimulator 732.18.6 - Device: iPhone 12 Pro (2C19C42D-564E-42CB-B805-C9C49BB1E8FD) - Runtime: iOS 14.4 (18D46) - DeviceType: iPhone 12 Pro
Thread 0 Crashed:: tid_307 Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff61131462 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6116a610 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff200fac2e __abort + 139
3 libsystem_c.dylib 0x00007fff200faba3 abort + 135
4 io.myapp.myapp-easyapp 0x00000001045caa6f xamarin_unhandled_exception_handler + 31 (runtime.m:1151)
5 io.myapp.myapp-easyapp 0x000000010445f415 mono_invoke_unhandled_exception_hook + 133 (exception.c:1265)
6 io.myapp.myapp-easyapp 0x000000010439ce2a mono_handle_exception_internal + 6986 (mini-exceptions.c:2782)
7 io.myapp.myapp-easyapp 0x000000010439b2d9 mono_handle_exception + 25 (mini-exceptions.c:3107)
8 io.myapp.myapp-easyapp 0x000000010431b969 mono_amd64_throw_exception + 169 (exceptions-amd64.c:409)
9 ??? 0x0000000104f6a5b0 0 + 4378240432
10 io.myapp.myapp-easyapp 0x00000001045ca7ed xamarin_process_managed_exception + 301 (runtime.m:2356)
11 io.myapp.myapp-easyapp 0x00000001045d1482 xamarin_invoke_trampoline + 1250 (trampolines-invoke.m:686)
12 io.myapp.myapp-easyapp 0x00000001045d3642 xamarin_arch_trampoline + 82 (trampolines-x86_64.m:491)
13 io.myapp.myapp-easyapp 0x00000001045d400a xamarin_x86_64_common_trampoline + 118 (trampolines-x86_64-asm.s:51)
14 com.apple.Foundation 0x00007fff208592ba __NSThreadPerformPerform + 204
15 com.apple.CoreFoundation 0x00007fff2039038a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 com.apple.CoreFoundation 0x00007fff20390282 __CFRunLoopDoSource0 + 180
17 com.apple.CoreFoundation 0x00007fff2038f7c6 __CFRunLoopDoSources0 + 346
18 com.apple.CoreFoundation 0x00007fff20389f2f __CFRunLoopRun + 878
19 com.apple.CoreFoundation 0x00007fff203896d6 CFRunLoopRunSpecific + 567
20 com.apple.GraphicsServices 0x00007fff2c257db3 GSEventRunModal + 139
21 com.apple.UIKitCore 0x00007fff24696cf7 -[UIApplication _run] + 912
22 com.apple.UIKitCore 0x00007fff2469bba8 UIApplicationMain + 101
23 ??? 0x00000001065cb0a4 0 + 4401705124
24 ??? 0x00000001065caf13 0 + 4401704723
25 ??? 0x00000001065c7313 0 + 4401689363
26 io.myapp.myapp-easyapp 0x00000001043b36d1 mono_jit_runtime_invoke + 1569 (mini-runtime.c:3191)
27 io.myapp.myapp-easyapp 0x00000001044d9c08 do_runtime_invoke + 54 (object.c:3052) [inlined]
28 io.myapp.myapp-easyapp 0x00000001044d9c08 mono_runtime_invoke_checked + 136 (object.c:3220)
29 io.myapp.myapp-easyapp 0x00000001044dff75 do_exec_main_checked + 60 [inlined]
30 io.myapp.myapp-easyapp 0x00000001044dff75 mono_runtime_exec_main_checked + 117 (object.c:5284)
31 io.myapp.myapp-easyapp 0x00000001043124ec mono_jit_exec_internal + 14 (driver.c:1383) [inlined]
32 io.myapp.myapp-easyapp 0x00000001043124ec mono_jit_exec + 364 (driver.c:1328)
33 io.myapp.myapp-easyapp 0x00000001045d3196 xamarin_main + 1686 (monotouch-main.m:493)
34 io.myapp.myapp-easyapp 0x00000001042cc857 main + 55 (main.m:55)
35 libdyld.dylib 0x00007fff2025a3e9 start + 1
Fortunately the problem is Entitlement.plist, for some reason when use SecureStorage from Xamarin.Essentials, the application crash in release Testflight on shop, so I remove SecureStorage and problem solved.
Thanks all for all the answers.

View inside ViewController not updating (IB Designables Error)

Recently I got this error:
Failed to render and update auto layout status for YourViewController (GwR-7s-08s): The agent crashed
I've tried:
Editor > Refresh all views
Delete Derived Data
Delete and Undo my view controller
Restart My Pc
I'm really lost now.
This is what i found from console (~/Library/Logs/DiagnosticReports) IBDesignablesAgent-IOS.crash.
Process: IBDesignablesAgent-iOS [8917]
Path: /Users/USER/Desktop/Xcode (Vers 10.1).app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBDesignablesAgent-iOS
Identifier: IBDesignablesAgent-iOS
Version: 10.1 (14460.20)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [696]
Responsible: IBDesignablesAgent-iOS [8917]
User ID: 501
Date/Time: 2020-04-15 18:02:05.468 +0800
OS Version: Mac OS X 10.14.6 (18G103)
Report Version: 12
Bridge OS Version: 4.1 (17P1081)
Anonymous UUID: CBF175F5-90A8-CA46-157A-EAC22B0E9C53
Time Awake Since Boot: 7000 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [8917]
Application Specific Information:
CoreSimulator 681.15 - Device: iPhone 8 (B66229B4-2385-44FD-B679-B71B2306DF10) - Runtime: iOS 12.1 (16B91) - DeviceType: iPhone 8
Fatal error: Unexpectedly found nil while unwrapping an Optional value
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000226d276f1 specialized _fatalErrorMessage(_:_:file:line:flags:) + 113
1 libswiftCore.dylib 0x0000000226b5d053 _fatalErrorMessage(_:_:file:line:flags:) + 19
2 com.MiCaresvc.MyMed 0x0000000225e03dac UsefulLinksTableViewCell.layoutSubviews() + 268
3 com.MiCaresvc.MyMed 0x0000000225e041f4 #objc UsefulLinksTableViewCell.layoutSubviews() + 36
4 com.apple.UIKitCore 0x000000011d38d795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
5 com.apple.QuartzCore 0x000000010e885b19 -[CALayer layoutSublayers] + 175
6 com.apple.QuartzCore 0x000000010e88a9d3 CA::Layer::layout_if_needed(CA::Transaction*) + 395
7 com.apple.UIKitCore 0x000000011d378077 -[UIView(Hierarchy) layoutBelowIfNeeded] + 1429
8 com.apple.IBCocoaTouchToolFoundation 0x000000010d33d267 -[UITableViewCell(IBCocoaTouchToolIntegration) awakeAfterMarshallerDidEstablishAttributesWithContext:] + 58
9 com.apple.IBCocoaTouchToolFoundation 0x000000010d332248 -[IBCocoaTouchToolObjectPackage initWithRequest:globalMarshallingContext:] + 3391
10 com.apple.IBCocoaTouchToolFoundation 0x000000010d330d91 +[IBCocoaTouchToolObjectPackage objectPackageFromRequest:] + 67
11 com.apple.IBCocoaTouchToolFoundation 0x000000010d333f1e +[IBCocoaTouchToolObjectPackage decodeWithBinaryUnarchiver:] + 106
12 com.apple.dt.IBFoundation 0x000000010e54241c -[IBBinaryUnarchiver decodeObject] + 109
13 com.apple.dt.IBFoundation 0x000000010e5e2e4f -[IBObjectBasedMarshallingRequest initWithBinaryUnarchiver:] + 135
14 com.apple.dt.IBAutolayoutFoundation 0x000000010e4b2f63 -[IBFullSceneUpdateRequest initWithBinaryUnarchiver:] + 65
15 com.apple.dt.IBFoundation 0x000000010e538f05 +[NSObject(IBBinaryArchivingAdditions) decodeWithBinaryUnarchiver:] + 65
16 com.apple.dt.IBFoundation 0x000000010e54241c -[IBBinaryUnarchiver decodeObject] + 109
17 com.apple.dt.IBFoundation 0x000000010e54281d -[IBBinaryUnarchiver decodeObjectReferenceIfPossible] + 74
18 com.apple.dt.IBFoundation 0x000000010e539486 -[NSArray(IBBinaryArchivingAdditions) initWithBinaryUnarchiver:] + 180
19 com.apple.dt.IBFoundation 0x000000010e538f05 +[NSObject(IBBinaryArchivingAdditions) decodeWithBinaryUnarchiver:] + 65
20 com.apple.dt.IBFoundation 0x000000010e54241c -[IBBinaryUnarchiver decodeObject] + 109
21 com.apple.dt.IBFoundation 0x000000010e62e745 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:] + 424
22 com.apple.dt.IBFoundation 0x000000010e62e152 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke + 143
23 libdispatch.dylib 0x00000001167f954b _dispatch_client_callout + 8
24 libdispatch.dylib 0x0000000116806036 _dispatch_async_and_wait_invoke + 109
25 libdispatch.dylib 0x00000001167f954b _dispatch_client_callout + 8
26 libdispatch.dylib 0x0000000116805380 _dispatch_main_queue_callback_4CF + 1290
27 com.apple.CoreFoundation 0x00000001105183e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
28 com.apple.CoreFoundation 0x0000000110512a76 __CFRunLoopRun + 2342
29 com.apple.CoreFoundation 0x0000000110511e11 CFRunLoopRunSpecific + 625
30 com.apple.Foundation 0x000000010eaea322 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
31 com.apple.dt.IBFoundation 0x000000010e5e9c36 -[IBAbstractPlatformTool startServingReceiveChannel:] + 447
32 com.apple.dt.IBFoundation 0x000000010e5e9ef2 -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:] + 119
33 com.apple.dt.IBFoundation 0x000000010e5ead9a +[IBAbstractPlatformTool main] + 1211
34 IBDesignablesAgent-iOS 0x000000010d253957 main + 34
35 libdyld.dylib 0x0000000116869575 start + 1

Xcode 10 not symbolicating crash log

I have couple of crashes on startup of app and there are no code changes made since it was last installed by Xcode. When I open device logs, Xcode is not fully symbolicating crash, particularly the place where it crashed. Why is it so and how do I get the fully symbolicated crash log? The crash is unfortunately not reproducible in direct debugging session.
Date/Time: 2018-12-01 12:30:38.3874 +0400
Launch Time: 2018-12-01 12:30:36.0854 +0400
OS Version: iPhone OS 12.1 (16B92)
Baseband Version: 2.01.07
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000101abe1a4
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [43684]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000101abe1a4 0x1018cc000 + 2040228
1 libswiftCore.dylib 0x0000000101abe1a4 0x1018cc000 + 2040228
2 libswiftCore.dylib 0x0000000101925db8 0x1018cc000 + 368056
3 MyApp-Swift 0x0000000100e69880 0x100d64000 + 1071232
4 MyApp-Swift 0x0000000100dfbd00 0x100d64000 + 621824
5 MyApp-Swift 0x0000000100dfbdb8 0x100d64000 + 622008
6 UIKitCore 0x00000001c29da768 -[UIApplication sendAction:to:from:forEvent:] + 96
7 UIKitCore 0x00000001c24686d0 -[UIControl sendAction:to:forEvent:] + 80
8 UIKitCore 0x00000001c24689f0 -[UIControl _sendActionsForEvents:withEvent:] + 440
9 UIKitCore 0x00000001c24679f0 -[UIControl touchesEnded:withEvent:] + 568
10 UIKitCore 0x00000001c2a1418c -[UIWindow _sendTouchesForEvent:] + 2472
11 UIKitCore 0x00000001c2a153f0 -[UIWindow sendEvent:] + 3156
12 UIKitCore 0x00000001c29f46ec -[UIApplication sendEvent:] + 340
13 UIKitCore 0x00000001c2ac057c __dispatchPreprocessedEventFromEventQueue + 1620
14 UIKitCore 0x00000001c2ac2f74 __handleEventQueueInternal + 4740
15 UIKitCore 0x00000001c2abba64 __handleHIDEventFetcherDrain + 152
16 CoreFoundation 0x00000001958ac1cc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
17 CoreFoundation 0x00000001958ac14c __CFRunLoopDoSource0 + 88
18 CoreFoundation 0x00000001958aba30 __CFRunLoopDoSources0 + 176
19 CoreFoundation 0x00000001958a68fc __CFRunLoopRun + 1040
20 CoreFoundation 0x00000001958a61cc CFRunLoopRunSpecific + 436
21 GraphicsServices 0x0000000197b1d584 GSEventRunModal + 100
22 UIKitCore 0x00000001c29d9054 UIApplicationMain + 212
23 MyApp-Swift 0x0000000100f48dec 0x100d64000 + 1986028
24 libdyld.dylib 0x0000000195366bb4 start + 4

IOS fullscreen video player crash issue

When I was debugging the iOS application, meet with some issue causing application to crash when playing video in fullscreen mode and this issue is concerned with the specific device iPhone 6s. The application works good in iPhone 6 and iPhone 5s without crash.
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-09-12 17:41:50.50 -0700
Launch Time: 2016-09-12 17:41:27.27 -0700
OS Version: iOS 9.3.4 (13G35)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000180a96234
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreFoundation 0x0000000180a96234 CFEqual + 512
1 CoreGraphics 0x0000000182025a3c CGGradientCreateWithColors + 232
2 CoreGraphics 0x0000000182025a3c CGGradientCreateWithColors + 232
3 UIKit 0x000000018621cf34 +[UIProgressView _tintedImageForHeight:andColors:roundingRectCorners:] + 356
4 UIKit 0x0000000186109524 __50-[UISlider _updateMaxTrackColorForInitialization:]_block_invoke + 148
5 UIKit 0x00000001860217b0 +[UIView _performSystemAppearanceModifications:] + 68
6 UIKit 0x000000018610942c -[UISlider _updateMaxTrackColorForInitialization:] + 476
7 UIKit 0x0000000185f74c08 -[UISlider _initImages] + 568
8 UIKit 0x0000000185f7495c -[UISlider layoutSubviews] + 92
9 MediaPlayer 0x0000000189ad0544 -[MPVolumeSlider layoutSubviews] + 56
10 UIKit 0x0000000185d141e4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 656
11 QuartzCore 0x00000001836a698c -[CALayer layoutSublayers] + 148
12 QuartzCore 0x00000001836a15c8 CA::Layer::layout_if_needed(CA::Transaction*) + 292
13 UIKit 0x0000000185d2b0a4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 924
14 UIKit 0x0000000185d30bec -[UISlider setValue:animated:] + 184
15 MediaPlayer 0x0000000189ad0c8c -[MPVolumeSlider volumeController:volumeValueDidChange:] + 84
16 MediaPlayer 0x0000000189b68074 __39-[MPVolumeController updateVolumeValue]_block_invoke_2 + 240
17 libdispatch.dylib 0x00000001806054bc _dispatch_call_block_and_release + 24
18 libdispatch.dylib 0x000000018060547c _dispatch_client_callout + 16
19 libdispatch.dylib 0x000000018060ab84 _dispatch_main_queue_callback_4CF + 1844
20 CoreFoundation 0x0000000180b70d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
21 CoreFoundation 0x0000000180b6ebb8 __CFRunLoopRun + 1628
22 CoreFoundation 0x0000000180a98c50 CFRunLoopRunSpecific + 384
23 GraphicsServices 0x0000000182380088 GSEventRunModal + 180
24 UIKit 0x0000000185d82088 UIApplicationMain + 204

How do I debug this crash in UIDictationController?

Recently I am trying to debug with the information provided by Crash Reports. So far I have been able to identify and fix some bugs but not this one.
As I read from the crash report, it's something wrong with UIDictationController, but my code did not call UIDictationController at all. The crash report is generated by PLCrashReporter.
It seems that the user is using an iPad Mini (WiFi) and running iOS 6.0.2.
Incident Identifier: [REMOVED]
CrashReporter Key: [REMOVED]
Hardware Model: iPad2,5
Process: MyApp [2849]
Path: [REMOVED]
Identifier: com.yourcompany.MyApp
Version: 1.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-01-26 02:11:01 +0000
OS Version: iPhone OS 6.0.2 (10A550)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x32255350
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Last Exception Backtrace:
0 CoreFoundation 0x3882e2a3 __exceptionPreprocess + 163
1 libobjc.A.dylib 0x30d8897f objc_exception_throw + 31
2 CoreFoundation 0x387788d9 -[__NSArrayM insertObject:atIndex:] + 769
3 UIKit 0x36ad24c3 -[UIDictationMeterView initWithFrame:] + 267
4 UIKit 0x36abe699 -[UIDictationView initWithFrame:] + 281
5 UIKit 0x36abdcd1 +[UIDictationView sharedInstance] + 145
6 UIKit 0x36aae7f5 -[UIDictationController setState:] + 149
7 UIKit 0x36aaef5f -[UIDictationController setupForDictationStart] + 199
8 UIKit 0x36aae5d7 -[UIDictationController startConnectionForReason:] + 51
9 UIKit 0x36aaf173 -[UIDictationController startDictationFromLayout] + 55
10 UIKit 0x36825c09 -[UIKeyboardLayoutStar touchUp:] + 5249
11 UIKit 0x3682472f -[UIKeyboardLayout touchesEnded:withEvent:] + 387
12 UIKit 0x3670c5f1 -[UIWindow _sendTouchesForEvent:] + 525
13 UIKit 0x366f9801 -[UIApplication sendEvent:] + 381
14 UIKit 0x366f911b _UIApplicationHandleEvent + 6155
15 GraphicsServices 0x3771e5a3 _PurpleEventCallback + 591
16 GraphicsServices 0x3771e1d3 PurpleEventCallback + 35
17 CoreFoundation 0x38803173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
18 CoreFoundation 0x38803117 __CFRunLoopDoSource1 + 139
19 CoreFoundation 0x38801f99 __CFRunLoopRun + 1385
20 CoreFoundation 0x38774ebd CFRunLoopRunSpecific + 357
21 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
22 GraphicsServices 0x3771d2eb GSEventRunModal + 75
23 UIKit 0x3674d2f9 UIApplicationMain + 1121
24 MyApp 0x000032e1 main (main.m:36)
25 MyApp 0x00003230 start + 40
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x30f10350 __pthread_kill + 8
1 libsystem_c.dylib 0x304f8973 abort + 95
2 MyApp 0x000e954f uncaught_exception_handler + 27
3 CoreFoundation 0x3882e57f __handleUncaughtException + 615
4 libobjc.A.dylib 0x30d88a65 _objc_terminate() + 129
5 libc++abi.dylib 0x3719807b safe_handler_caller(void (*)()) + 79
6 libc++abi.dylib 0x37198114 std::terminate() + 20
7 libc++abi.dylib 0x37199599 __cxa_current_exception_type + 1
8 libobjc.A.dylib 0x30d889d1 objc_exception_rethrow + 13
9 CoreFoundation 0x38774f21 CFRunLoopRunSpecific + 457
10 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
11 GraphicsServices 0x3771d2eb GSEventRunModal + 75
12 UIKit 0x3674d2f9 UIApplicationMain + 1121
13 MyApp 0x000032e1 main (main.m:36)
Is there any way that I can do with this bug? Or, at least mitigating the issue? Thanks in advance.
the problem is that somewhere in your app you have a keyboard come up and with iOS version 6.0.1 and 6.0.2, apple enabled the dictation controller even if you didn't specify it to be enabled. Two solutions to fixing it: create a custom keyboard without it or implement dictation in your app.
My suggestion is to just let it be, only affects two outdate iOS versions and hopefully the crashes will go away as the users upgrade their devices
I have the keyboard coming up for a custom TextView, and when the user pushed the dictation button, said something, pushed finish, and then they tried to dismiss the keyboard, there would be a crash. Possible this is also what you're experiencing?

Resources