Since 3rd beta of iOS 11 my app has started crashing when initialising a MPVolumeView used for AirPlay. The following piece of code is working perfectly fine on earlier versions of iOS and iOS 11 beta 1 and 2.
func setupAirplayButton() {
let rect = CGRect(x: -1000, y: -1000, width: 10, height: 10)
volumeView = MPVolumeView(frame: rect) //app crashes here
volumeView.showsVolumeSlider = false
volumeView.setRouteButtonImage(nil, for: .normal)
volumeView.translatesAutoresizingMaskIntoConstraints = false
volumeView.isHidden = true
if let airplayButton = volumeView.subviews.filter({$0 is UIButton }).first as? UIButton {
self.airplayButton = airplayButton
self.airplayButton?.addObserver(self, forKeyPath: "alpha", options: [.initial, .new], context: nil)
}
NotificationCenter.default.addObserver(self, selector: #selector(wirelessRouteActiveChanged), name: NSNotification.Name.MPVolumeViewWirelessRouteActiveDidChange, object: nil)
myView.addSubview(volumeView)
}
Is anyone else experiencing the same issue?
Edit:
Crash log
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: MyApp [4543]
Triggered by Thread: 0
Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: trying to lock recursively
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x000000018050b4fc (anonymous namespace)::AutoreleasePoolPage::AutoreleasePoolPage(+ 161020 (anonymous namespace)::AutoreleasePoolPage*) + 28
1 libobjc.A.dylib 0x000000018050b294 (anonymous namespace)::AutoreleasePoolPage::autoreleaseFullPage(objc_object*, + 160404 (anonymous namespace)::AutoreleasePoolPage*) + 60
2 libobjc.A.dylib 0x000000018050b294 (anonymous namespace)::AutoreleasePoolPage::autoreleaseFullPage(objc_object*, + 160404 (anonymous namespace)::AutoreleasePoolPage*) + 60
3 libobjc.A.dylib 0x0000000180508e48 objc_object::rootAutorelease2+ 151112 () + 124
4 CoreUI 0x0000000188a71a48 -[CUICommonAssetStorage renditionInfoForIdentifier:] + 188
5 CoreUI 0x0000000188a7c408 -[CUIStructuredThemeStore _canGetRenditionWithKey:isFPO:lookForSubstitutions:] + 152
6 CoreUI 0x0000000188aa5854 -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:iconSizeIndex:] + 2112
7 CoreUI 0x0000000188aa5010 -[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:withBaseKeySelector:] + 308
8 CoreUI 0x0000000188aa3d7c -[CUICatalog _namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:] + 176
9 CoreUI 0x0000000188aa406c -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:] + 156
10 UIKit 0x000000018b4b4ca0 __139-[_UIAssetManager imageNamed:scale:gamut:layoutDirection:idiom:userInterfaceStyle:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 256
11 UIKit 0x000000018b4b4ae4 -[_UIAssetManager imageNamed:scale:gamut:layoutDirection:idiom:userInterfaceStyle:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 224
12 UIKit 0x000000018b4b5310 -[_UIAssetManager imageNamed:withTrait:] + 576
13 UIKit 0x000000018acbc6cc +[UIImage imageNamed:inBundle:compatibleWithTraitCollection:] + 220
14 UIKit 0x000000018aa7cb74 +[UIImage+ 465780 (UIImagePrivate) imageNamed:inBundle:] + 152
15 MediaPlayer 0x0000000191c36890 -[MPVolumeView _defaultRouteButtonImageAsSelected:] + 120
16 MediaPlayer 0x0000000191c36704 -[MPVolumeView _createSubviews] + 888
17 MediaPlayer 0x0000000191c35288 -[MPVolumeView _initWithStyle:] + 204
18 MediaPlayer 0x0000000191c35370 -[MPVolumeView initWithFrame:style:] + 80
19 MyFramework 0x0000000101b59a84 #nonobjc MPVolumeView.init() + 645764 (ViewController.swift:0)
20 MyFramework 0x0000000101b3a83c MPVolumeView.__allocating_init() + 518204 (ViewController.swift:0)
21 MyFramework 0x0000000101b39b90 ViewController.setupAirplayButton() + 514960 (ViewController.swift:337)
22 MyFramework 0x0000000101b341a4 ViewController.viewDidAppear(_:) + 491940 (ViewController.swift:132)
23 MyFramework 0x0000000101b341f4 #objc ViewController.viewDidAppear(_:) + 492020 (ViewController.swift:0)
24 UIKit 0x000000018aa32e44 -[UIViewController _setViewAppearState:isAnimating:] + 852
25 UIKit 0x000000018aa9c64c __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 44
26 UIKit 0x000000018aa9c5e8 -[UIViewController _executeAfterAppearanceBlock] + 92
27 UIKit 0x000000018ac8a368 _runAfterCACommitDeferredBlocks + 556
28 UIKit 0x000000018ac7d8b4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 288
29 UIKit 0x000000018ac95614 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 152
30 CoreFoundation 0x0000000180f85f24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
31 CoreFoundation 0x0000000180f85718 __CFRunLoopDoBlocks + 288
32 CoreFoundation 0x0000000180f83440 __CFRunLoopRun + 852
33 CoreFoundation 0x0000000180ea5bf0 CFRunLoopRunSpecific + 436
34 GraphicsServices 0x0000000182cfffac GSEventRunModal + 100
35 UIKit 0x000000018aa7dec4 UIApplicationMain + 208
36 MyApp 0x000000010164a558 main + 189784 (AppDelegate.swift:14)
37 libdyld.dylib 0x00000001809ca1e0 start + 4
This appears to be a problem in the simulator. Running on the device causes no issues.
Same here. The funny part: it‘s working on the iPad Pro (12“) but crashing on the iPhone (7 plus).
Tried instantiating with/without frame, by class name, via ObjC at different moments.
When I keep tapping (starting) the app multiple times it actually won’t crash at some point, but the volume view instance is missing in the view hierarchy.
I guess we have to wait for the next beta to fix this issue. :-/
iOS 11 beta 4 fixed the crash issues for my app.
I don‘t see the UISlider itself though.
Related
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
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
Apple rejected my app with a crash report, I have tried symbolicating with the dSYM file from the original app build for the store and this is the crashlogs.
Seems that the app crash on start, but I tried to install the same version sent to them on my devices and it works as expected on my device. Any idea?
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1832fe59c 0x1831d8000 + 1205660
1 libobjc.A.dylib 0x193f640e4 0x193f5c000 + 32996
2 CoreFoundation 0x1831e91f8 0x1831d8000 + 70136
3 UIKit 0x187b4c858 0x187aa0000 + 706648
4 UIKit 0x187b6d9f4 0x187aa0000 + 842228
5 UIKit 0x187eb307c 0x187aa0000 + 4272252
6 UIKit 0x187b6eca4 0x187aa0000 + 847012
7 UIKit 0x187fcd718 0x187aa0000 + 5429016
8 UIKit 0x187ab0844 0x187aa0000 + 67652
9 UIKit 0x187ab07b0 0x187aa0000 + 67504
10 UIKit 0x187fccfbc 0x187aa0000 + 5427132
11 UIKit 0x187fcace8 0x187aa0000 + 5418216
12 UIKit 0x187adc788 0x187aa0000 + 247688
13 UIKit 0x187d47238 0x187aa0000 + 2781752
14 UIKit 0x187d46cec 0x187aa0000 + 2780396
15 UIKit 0x187d46c44 0x187aa0000 + 2780228
16 UIKit 0x187d3a578 0x187aa0000 + 2729336
17 UIKit 0x187d39fe0 0x187aa0000 + 2727904
18 FrontBoardServices 0x18b549edc 0x18b540000 + 40668
19 FrontBoardServices 0x18b55962c 0x18b540000 + 103980
20 CoreFoundation 0x1832b6a28 0x1831d8000 + 911912
21 CoreFoundation 0x1832b5b30 0x1831d8000 + 908080
22 CoreFoundation 0x1832b4154 0x1831d8000 + 901460
23 CoreFoundation 0x1831e10a4 0x1831d8000 + 37028
24 UIKit 0x187b1b3c8 0x187aa0000 + 504776
25 UIKit 0x187b163c0 0x187aa0000 + 484288
26 My App 0x100016424 main (main.m:26)
27 libdyld.dylib 0x1945d2a08 0x1945d0000 + 10760
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001946eb270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000194789224 pthread_kill + 108
2 libsystem_c.dylib 0x0000000194662b14 abort + 108
3 libc++abi.dylib 0x0000000193735414 abort_message + 112
4 libc++abi.dylib 0x0000000193754b88 default_terminate_handler() + 300
5 libobjc.A.dylib 0x0000000193f643bc _objc_terminate() + 124
6 libc++abi.dylib 0x0000000193751bb0 std::__terminate(void (*)()) + 12
7 libc++abi.dylib 0x0000000193751738 __cxa_rethrow + 140
8 libobjc.A.dylib 0x0000000193f64290 objc_exception_rethrow + 40
9 CoreFoundation 0x00000001831e1150 CFRunLoopRunSpecific + 568
10 UIKit 0x0000000187b1b3c4 -[UIApplication _run] + 548
11 UIKit 0x0000000187b163bc UIApplicationMain + 1484
12 My App 0x0000000100016420 main (main.m:26)
13 libdyld.dylib 0x00000001945d2a04 start + 0
Any help would be greatly appreciated.
EDIT 15/01/2015
I did the symbolication on the previous crash logs but the backtrace was still hiding same property so I found here the solution to solve the backtrace. Basically I had a better report attaching another device:
Last Exception Backtrace:
0 CoreFoundation 0x1832fe59c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x193f640e4 objc_exception_throw + 60
2 CoreFoundation 0x1831e91f8 -[__NSDictionaryM setObject:forKey:] + 972
3 UIKit 0x187b4c858 -[UILabel _setLineBreakMode:] + 616
4 UIKit 0x187b6d9f4 -[UIButtonLabel setLineBreakMode:] + 108
5 UIKit 0x187eb307c -[UIButton _setupTitleViewRequestingLayout:] + 204
6 UIKit 0x187b6eca4 -[UIButton titleLabel] + 56
7 UIKit 0x187fcd718 -[UIZoomViewController loadView] + 568
8 UIKit 0x187ab0844 -[UIViewController loadViewIfRequired] + 88
9 UIKit 0x187ab07b0 -[UIViewController view] + 32
10 UIKit 0x187fccfbc -[UIZoomViewController init] + 92
11 UIKit 0x187fcace8 -[UIClassicController _setupWindow] + 584
12 UIKit 0x187adc788 +[UIClassicController sharedClassicController] + 172
13 UIKit 0x187d47238 -[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:] + 724
14 UIKit 0x187d46cec __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 140
15 UIKit 0x187d46c44 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 380
16 UIKit 0x187d3a578 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 512
17 UIKit 0x187d39fe0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 380
18 FrontBoardServices 0x18b549edc __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 248
19 FrontBoardServices 0x18b55962c __31-[FBSSerialQueue performAsync:]_block_invoke + 28
20 CoreFoundation 0x1832b6a28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ +20
21 CoreFoundation 0x1832b5b30 __CFRunLoopDoBlocks + 312
22 CoreFoundation 0x1832b4154 __CFRunLoopRun + 1756
23 CoreFoundation 0x1831e10a4 CFRunLoopRunSpecific + 396
24 UIKit 0x187b1b3c8 -[UIApplication _run] + 552
25 UIKit 0x187b163c0 UIApplicationMain + 1488
26 MyApp 0x100016424 main (main.m:26)
27 libdyld.dylib 0x1945d2a08 start + 4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001946eb270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000194789224 pthread_kill + 108
2 libsystem_c.dylib 0x0000000194662b14 abort + 108
3 libc++abi.dylib 0x0000000193735414 abort_message + 112
4 libc++abi.dylib 0x0000000193754b88 default_terminate_handler() + 300
5 libobjc.A.dylib 0x0000000193f643bc _objc_terminate() + 124
6 libc++abi.dylib 0x0000000193751bb0 std::__terminate(void (*)()) + 12
7 libc++abi.dylib 0x0000000193751738 __cxa_rethrow + 140
8 libobjc.A.dylib 0x0000000193f64290 objc_exception_rethrow + 40
9 CoreFoundation 0x00000001831e1150 CFRunLoopRunSpecific + 568
10 UIKit 0x0000000187b1b3c4 -[UIApplication _run] + 548
11 UIKit 0x0000000187b163bc UIApplicationMain + 1484
12 MyApp 0x0000000100016420 main (main.m:26)
13 libdyld.dylib 0x00000001945d2a04 start + 0
Cheers
Try-
Loading the App through iTunes if you haven't already
Using something like TestFlight to launch beta tests of your app, and see if it crashes there
If you still don't encounter any problems, contact the App Review team through the Resolution Center in iTunesConnect, and sort out the problem with them
Note: I had a similar problem, where Apple rejected my app saying it was crashing when in truth it wasn't. When I contacted The Review Team, turned out that they had tested another app, and mixed up which one to reject! At times, they do make strange mistakes, so its always good to just contact them once. No harm no foul.
Hope I helped!
At finally I found the solution reading this. The crash was related to the font, but it happened only on the iPad device that I was not testing
App crashing when pop two times the navigationController and in iPhone log return this error :(
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x6545f661
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3a081636 objc_msgSend + 22
1 UIKit 0x322bef20 -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 60
2 UIKit 0x32039188 -[UIScrollView setContentOffset:] + 592
3 UIKit 0x320e61e6 -[UITableView setContentOffset:] + 346
4 UIKit 0x322bfe62 -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 1350
5 UIKit 0x320ebd0e -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 410
6 UIKit 0x320ebb66 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 26
7 UIKit 0x320ebb22 -[UIScrollView removeFromSuperview] + 26
8 UIKit 0x3201a3b6 -[UIView dealloc] + 374
9 libobjc.A.dylib 0x3a0870d2 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
10 CoreFoundation 0x2f730c14 _CFAutoreleasePoolPop + 12
11 CoreFoundation 0x2f7c6176 __CFRunLoopRun + 1302
12 CoreFoundation 0x2f730eba CFRunLoopRunSpecific + 518
13 CoreFoundation 0x2f730c9e CFRunLoopRunInMode + 102
14 GraphicsServices 0x3468a65e GSEventRunModal + 134
15 UIKit 0x3207d148 UIApplicationMain + 1132
16 Big24H 0x000e9728 main (main.m:16)
17 libdyld.dylib 0x3a584ab4 start + 0
Looks like you have a UIScrollViewDelegate being deallocated before its corresponding UIScrollView and then getting called.
You didn't provide any code so the best I can say is you need to find where it is and nil it out when it is getting deallocated.
Probably something like this:
- (void) dealloc
{
myScrollView.delegate = nil;
}
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?