GULUserDefaults crash Swift Xcode (maybe firebase) - swift

I am facing this error really randomly and rarely but still want to fix it. I don't know how to reproduce it as its not happening on my device but on other users devices.
The crash log does not really help me, at least I cannot figure out where the is issue is coming from and how to solve it.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000001c
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x19fa3513c object_isClass + 16
1 Foundation 0x18c807978 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 48
2 Foundation 0x18c807774 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 288
3 Foundation 0x18c7413f8 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 836
4 CoreFoundation 0x18b3cc60c -[CFPrefsSource forEachObserver:] + 336
5 CoreFoundation 0x18b3cde3c -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 112
6 CoreFoundation 0x18b541b68 ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 428
7 CoreFoundation 0x18b4253f0 __CFDictionaryApplyFunction_block_invoke + 28
8 CoreFoundation 0x18b50bd94 CFBasicHashApply + 144
9 CoreFoundation 0x18b4253ac CFDictionaryApplyFunction + 240
10 CoreFoundation 0x18b53d748 _CFPrefsDeliverPendingKVONotificationsGuts + 300
11 CoreFoundation 0x18b53bf44 -[_CFXPreferences _deliverPendingKVONotifications] + 96
12 CoreFoundation 0x18b4ff194 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 432
13 CoreFoundation 0x18b4fe720 normalizeQuintuplet + 356
14 CoreFoundation 0x18b4fefbc -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 152
15 CoreFoundation 0x18b3c1580 -[_CFXPreferences setValue:forKey:appIdentifier:container:configurationURL:] + 128
16 CoreFoundation 0x18b53fdd8 _CFPreferencesSetAppValueWithContainerAndConfiguration + 136
17 GoogleUtilities 0x1012a7acc -[GULUserDefaults setObject:forKey:] + 109 (GULUserDefaults.m:109)
18 FirebaseMessaging 0x1011a86b0 -[FIRMessagingPubSub archivePendingTopicsList:] + 238 (FIRMessagingPubSub.m:238)
19 FirebaseMessaging 0x1011a67d4 -[FIRMessagingPendingTopicsList addOperationForTopic:withAction:completion:] + 164 (FIRMessagingPendingTopicsList.m:164)
20 FirebaseMessaging 0x1011a8304 -[FIRMessagingPubSub subscribeToTopic:handler:] + 184 (FIRMessagingPubSub.m:184)
21 FirebaseMessaging 0x1011a16a8 __44-[FIRMessaging subscribeToTopic:completion:]_block_invoke + 674 (FIRMessaging.m:674)
22 FirebaseInstanceID 0x101166674 __39-[FIRInstanceID instanceIDWithHandler:]_block_invoke + 220 (FIRInstanceID.m:220)
23 FirebaseInstanceID 0x101167ee8 __34-[FIRInstanceID getIDWithHandler:]_block_invoke + 454 (FIRInstanceID.m:454)
24 FirebaseInstallations 0x1011378a8 __49-[FIRInstallations installationIDWithCompletion:]_block_invoke + 210 (FIRInstallations.m:210)
25 FBLPromises 0x100deda48 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.48 + 273 (FBLPromise.m:273)
26 libdispatch.dylib 0x18b0d324c _dispatch_call_block_and_release + 32
27 libdispatch.dylib 0x18b0d4db0 _dispatch_client_callout + 20
28 libdispatch.dylib 0x18b0e2800 _dispatch_main_queue_callback_4CF + 920
29 CoreFoundation 0x18b45c11c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
30 CoreFoundation 0x18b456120 __CFRunLoopRun + 2508
31 CoreFoundation 0x18b45521c CFRunLoopRunSpecific + 600
32 GraphicsServices 0x1a24d4784 GSEventRunModal + 164
33 UIKitCore 0x18de8e200 -[UIApplication _run] + 1072
34 UIKitCore 0x18de93a74 UIApplicationMain + 168
35 MyApp 0x100424788 main + 20 (HashtagTableViewCell.swift:20)
36 libdyld.dylib 0x18b1156c0 start + 4
It looks like its coming from firebase but ultimately it crashes on the user defaults.
Any idea or hint how to solve this is greatly appreciated.
GULUserDefaults.m line 109
this is the headline of the crash in my firebase Crashlytics

Related

NSInvalidArgumentException', reason: '-[__SwiftValue set]

Scenario
I have a SwiftUI app that has been working perfectly fine.
I upgrade Xcode to 13.2.1 and I'm able to launch the application but when I navigate to a certain part of the application I'm getting this error on device and during SwiftUI preview.
'NSInvalidArgumentException', reason: '-[__SwiftValue set]: unrecognized selector sent to instance 0x600001bd9590'
Feedback / Assistance
Can anyone provide instructions / steps to debug this?
How can I find out what is instance 0x600001bd9590 and who is setting the NSInvalidArgumentException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__SwiftValue set]: unrecognized selector sent to instance 0x600001bd9590'
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/m1/Library/Developer/Xcode/DerivedData/NT-dfyuqrdtadtqdkaxajldzwimkhru/Build/Intermediates.noindex/Previews/NT/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/PrivateFrameworks/PreviewsInjection.framework/PreviewsInjection DYLD_FRAMEWORK_PATH=/Users/m1/Library/Developer/Xcode/DerivedData/NT-dfyuqrdtadtqdkaxajldzwimkhru/Build/Intermediates.noindex/Previews/NT/Products/Debug-iphonesimulator
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x1803e1174 __exceptionPreprocess + 216
1 libobjc.A.dylib 0x180193384 objc_exception_throw + 56
2 CoreFoundation 0x1803f0530 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x1803e53fc ___forwarding___ + 1408
4 CoreFoundation 0x1803e743c _CF_forwarding_prep_0 + 92
5 UIFoundation 0x18410cc7c -[NSCoreTypesetter _NSFastDrawString:length:attributes:paragraphStyle:typesetterBehavior:lineBreakMode:rect:padding:graphicsContext:baselineRendering:usesFontLeading:usesScreenFont:scrollable:syncAlignment:mirrored:boundingRectPointer:baselineOffsetPointer:drawingContext:] + 3820
6 UIFoundation 0x18410d6c0 -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:stringDrawingInterface:] + 1200
7 UIFoundation 0x184107bf0 __NSStringDrawingEngine + 1480
8 UIFoundation 0x184108b24 -[NSAttributedString(NSExtendedStringDrawing) drawWithRect:options:context:] + 128
9 UIKitCore 0x18524a2b4 -[UILabel _drawTextInRect:baselineCalculationOnly:] + 3100
10 UIKitCore 0x18524abb8 -[UILabel _drawTextInRect:] + 248
11 UIKitCore 0x185249330 -[UILabel drawTextInRect:] + 536
12 UIKitCore 0x185300714 -[UIView(CALayerDelegate) drawLayer:inContext:] + 536
13 QuartzCore 0x1883ad940 CABackingStoreUpdate_ + 192
14 QuartzCore 0x1884e0078 invocation function for block in CA::Layer::display_() + 52
15 QuartzCore 0x1884d66dc -[CALayer _display] + 1688
16 QuartzCore 0x1884e8ce4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 408
17 QuartzCore 0x18843c04c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 516
18 QuartzCore 0x188467860 CA::Transaction::commit() + 684
19 UIKitCore 0x184dc48f4 _afterCACommitHandler + 104
20 CoreFoundation 0x18034ef9c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
21 CoreFoundation 0x180349724 __CFRunLoopDoObservers + 556
22 CoreFoundation 0x180349c84 __CFRunLoopRun + 976
23 CoreFoundation 0x1803493a8 CFRunLoopRunSpecific + 572
24 GraphicsServices 0x18c03c5ec GSEventRunModal + 160
25 UIKitCore 0x184d937ac -[UIApplication _run] + 992
26 UIKitCore 0x184d982e8 UIApplicationMain + 112
27 SwiftUI 0x1b99bc7f4 closure #1 in KitRendererCommon(_:) + 160
28 SwiftUI 0x1b99bc750 runApp<A>(_:) + 164
29 SwiftUI 0x1b94124f4 static App.main() + 80
30 NT 0x102d46c24 static NTApp.$main() + 100
31 NT 0x102d46d38 main + 76
32 dyld_sim 0x10368dca0 start_sim + 20
33 dyld 0x1033d50f4 start + 520
34 ??? 0x4c15800000000000 ???
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x1c997ca60 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1c99ce380 pthread_kill + 256
2 libsystem_c.dylib 0x1800fe3d8 abort + 120
3 libc++abi.dylib 0x18022de94 abort_message + 128
4 libc++abi.dylib 0x18021fc98 demangling_terminate_handler() + 296
5 libobjc.A.dylib 0x180176e84 _objc_terminate() + 124
6 libc++abi.dylib 0x18022d358 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x18022fd98 __cxa_rethrow + 144
8 libobjc.A.dylib 0x1801934d4 objc_exception_rethrow + 40
9 CoreFoundation 0x180349494 CFRunLoopRunSpecific + 808
10 GraphicsServices 0x18c03c5ec GSEventRunModal + 160
11 UIKitCore 0x184d937ac -[UIApplication _run] + 992
12 UIKitCore 0x184d982e8 UIApplicationMain + 112
13 SwiftUI 0x1b99bc7f4 closure #1 in KitRendererCommon(_:) + 160
14 SwiftUI 0x1b99bc750 runApp<A>(_:) + 164
15 SwiftUI 0x1b94124f4 static App.main() + 80
16 NT 0x102d46c24 static NTApp.$main() + 100 (NTApp.swift:10)
17 NT 0x102d46d38 main + 76
18 dyld_sim 0x10368dca0 start_sim + 20
19 dyld 0x1033d50f4 start + 520

macCatalyst crash on UIScene in macOS 11 (Big Sur) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have a macCatalyst app that works perfectly on macOS 10.14, however on upgrading to macOS 11 (Big Sur) both I and my users are complaining that the app crashes on launch. I get an error message "Parameter was not of class UIScene" - do macCatalyst apps now require the use of scenes?
On further inspection, I see the following:
2020-11-28 01:48:40.327810+0000 AppName [13691:435322] *** Assertion failure in -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:], _UISceneMacHelperUtilities.m:83
2020-11-28 01:48:40.336334+0000 AppName[13691:435322] [General] An uncaught exception was raised
2020-11-28 01:48:40.336423+0000 AppName[13691:435322] [General] Parameter was not of class UIScene.
2020-11-28 01:48:40.336545+0000 AppName[13691:435322] [General] (
0 CoreFoundation 0x00007fff204ae6af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201e63c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff204d7512 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff212906c9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff44a7b2c6 -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:] + 195
5 UIKitMacHelper 0x00007fff34045f74 __46-[UINSApplicationDelegate _setupKeyWindowSync]_block_invoke + 393
6 Foundation 0x00007fff21192d6b -[__NSObserver _doit:] + 287
7 CoreFoundation 0x00007fff20429fdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
8 CoreFoundation 0x00007fff204c589b ___CFXRegistrationPost_block_invoke + 49
9 CoreFoundation 0x00007fff204c580f _CFXRegistrationPost + 454
10 CoreFoundation 0x00007fff203fabce _CFXNotificationPost + 723
11 Foundation 0x00007fff21166abe -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
12 UIKitCore 0x00007fff44376779 -[UIWindow _makeKeyWindowIgnoringOldKeyWindow:] + 567
13 AppName 0x00000001013fe0c0 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtF + 1520
14 AppName 0x00000001013feaa6 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtFTo + 118
15 UIKitCore 0x00007fff44221a31 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1463
16 UIKitCore 0x00007fff4421ffb1 -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1109
17 UIKitCore 0x00007fff4421ecfe -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 299
18 UIKitCore 0x00007fff4421eb49 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
19 FrontBoardServices 0x00007fff317e7312 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
20 FrontBoardServices 0x00007fff318045df __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
21 FrontBoardServices 0x00007fff317d60c1 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
22 FrontBoardServices 0x00007fff318042b7 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 354
23 libdispatch.dylib 0x00000001040c50b0 _dispatch_client_callout + 8
24 libdispatch.dylib 0x00000001040c8927 _dispatch_block_invoke_direct + 286
25 FrontBoardServices 0x00007fff317d5fd8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
26 FrontBoardServices 0x00007fff3181e1c3 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
27 FrontBoardServices 0x00007fff317d5fa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
28 CoreFoundation 0x00007fff204349fc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x00007fff20434964 __CFRunLoopDoSource0 + 180
30 CoreFoundation 0x00007fff204346df __CFRunLoopDoSources0 + 248
31 CoreFoundation 0x00007fff20433111 __CFRunLoopRun + 890
32 CoreFoundation 0x00007fff204326be CFRunLoopRunSpecific + 563
33 HIToolbox 0x00007fff2869efd0 RunCurrentEventLoopInMode + 292
34 HIToolbox 0x00007fff2869edcc ReceiveNextEventCommon + 709
35 HIToolbox 0x00007fff2869eaef _BlockUntilNextEventMatchingListInModeWithFilter + 64
36 AppKit 0x00007fff22c4bf85 _DPSNextEvent + 883
37 AppKit 0x00007fff22c4a74b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
38 AppKit 0x00007fff22c3cbda -[NSApplication run] + 586
39 AppKit 0x00007fff22c10f31 NSApplicationMain + 816
40 AppKit 0x00007fff22f0744d _NSApplicationMainWithInfoDictionary + 16
41 UIKitMacHelper 0x00007fff3403332e UINSApplicationMain + 1418
42 UIKitCore 0x00007fff44202e30 UIApplicationMain + 144
43 AppName 0x00000001014da40b main + 75
44 libdyld.dylib 0x00007fff20357631 start + 1
)
2020-11-28 01:48:40.337802+0000 AppName[13691:435322] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Parameter was not of class UIScene.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff204ae6af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201e63c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff204d7512 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff212906c9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff44a7b2c6 -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:] + 195
5 UIKitMacHelper 0x00007fff34045f74 __46-[UINSApplicationDelegate _setupKeyWindowSync]_block_invoke + 393
6 Foundation 0x00007fff21192d6b -[__NSObserver _doit:] + 287
7 CoreFoundation 0x00007fff20429fdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
8 CoreFoundation 0x00007fff204c589b ___CFXRegistrationPost_block_invoke + 49
9 CoreFoundation 0x00007fff204c580f _CFXRegistrationPost + 454
10 CoreFoundation 0x00007fff203fabce _CFXNotificationPost + 723
11 Foundation 0x00007fff21166abe -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
12 UIKitCore 0x00007fff44376779 -[UIWindow _makeKeyWindowIgnoringOldKeyWindow:] + 567
13 AppName 0x00000001013fe0c0 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtF + 1520
14 AppName 0x00000001013feaa6 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtFTo + 118
15 UIKitCore 0x00007fff44221a31 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1463
16 UIKitCore 0x00007fff4421ffb1 -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1109
17 UIKitCore 0x00007fff4421ecfe -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 299
18 UIKitCore 0x00007fff4421eb49 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
19 FrontBoardServices 0x00007fff317e7312 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
20 FrontBoardServices 0x00007fff318045df __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
21 FrontBoardServices 0x00007fff317d60c1 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
22 FrontBoardServices 0x00007fff318042b7 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 354
23 libdispatch.dylib 0x00000001040c50b0 _dispatch_client_callout + 8
24 libdispatch.dylib 0x00000001040c8927 _dispatch_block_invoke_direct + 286
25 FrontBoardServices 0x00007fff317d5fd8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
26 FrontBoardServices 0x00007fff3181e1c3 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
27 FrontBoardServices 0x00007fff317d5fa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
28 CoreFoundation 0x00007fff204349fc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x00007fff20434964 __CFRunLoopDoSource0 + 180
30 CoreFoundation 0x00007fff204346df __CFRunLoopDoSources0 + 248
31 CoreFoundation 0x00007fff20433111 __CFRunLoopRun + 890
32 CoreFoundation 0x00007fff204326be CFRunLoopRunSpecific + 563
33 HIToolbox 0x00007fff2869efd0 RunCurrentEventLoopInMode + 292
34 HIToolbox 0x00007fff2869edcc ReceiveNextEventCommon + 709
35 HIToolbox 0x00007fff2869eaef _BlockUntilNextEventMatchingListInModeWithFilter + 64
36 AppKit 0x00007fff22c4bf85 _DPSNextEvent + 883
37 AppKit 0x00007fff22c4a74b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
38 AppKit 0x00007fff22c3cbda -[NSApplication run] + 586
39 AppKit 0x00007fff22c10f31 NSApplicationMain + 816
40 AppKit 0x00007fff22f0744d _NSApplicationMainWithInfoDictionary + 16
41 UIKitMacHelper 0x00007fff3403332e UINSApplicationMain + 1418
42 UIKitCore 0x00007fff44202e30 UIApplicationMain + 144
43 AppName 0x00000001014da40b main + 75
44 libdyld.dylib 0x00007fff20357631 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Parameter was not of class UIScene.'
terminating with uncaught exception of type NSException

good methods to debug iOS exception

i want to debug my exception at my app,i have read
Debugging -[NSCFDictionary setObject:forKey:]: attempt to insert nil value add so on,but these methods is happen at i am running my app,so i can use add an Exception breakpoint, click the Add (+) button at the bottom of the breakpoints list and click Add Exception Breakpoint ,and use gcc command line怂but my question is if user give me a crash report,the bug not easy happen,how to solve it ,for example:
Application received signal SIGSEGV
(null)
(
0 CoreFoundation 0x3120e2bb + 186
1 libobjc.A.dylib 0x38f2b97f objc_exception_throw + 30
2 CoreFoundation 0x3120e1c5 + 0
3 myshine 0x001f9f51 myshine + 1503057
4 libsystem_c.dylib 0x393a9e8b _sigtramp + 34
5 myshine 0x000ac985 myshine + 137605
6 myshine 0x000ac35d myshine + 136029
7 CoreFoundation 0x311ab7cf + 74
8 CoreFoundation 0x311b1623 + 74
9 CoreFoundation 0x311ab507 + 326
10 CFNetwork 0x30f0fa8b + 98
11 CFNetwork 0x30f0ec71 + 36
12 CFNetwork 0x30f11365 + 44
13 CFNetwork 0x30f110f9 + 88
14 CFNetwork 0x30f114ff + 34
15 CFNetwork 0x30ed0ce1 + 324
16 CFNetwork 0x30ed1661 + 156
17 CFNetwork 0x30f0ec71 + 36
18 CFNetwork 0x30f11365 + 44
19 CoreFoundation 0x311e3683 + 14
20 CoreFoundation 0x311e2ee9 + 212
21 CoreFoundation 0x311e1cb7 + 646
22 CoreFoundation 0x31154ebd CFRunLoopRunSpecific + 356
23 CoreFoundation 0x311b39bb CFRunLoopRun + 98
24 myshine 0x000b20ef myshine + 159983
25 Foundation 0x31b24e85 + 972
26 libsystem_c.dylib 0x39382311 + 308
27 libsystem_c.dylib 0x393821d8 thread_start + 8
)
and
*** -[__NSArrayM objectAtIndex:]: index 121 beyond bounds [0 .. 23]
(
0 CoreFoundation 0x311963ff + 186
1 libobjc.A.dylib 0x38e87963 objc_exception_throw + 30
2 CoreFoundation 0x310e1ef9 + 164
3 myshine 0x001720b1 myshine + 1372337
4 UIKit 0x33090087 + 70
5 UIKit 0x3309003b + 30
6 UIKit 0x33090015 + 44
7 UIKit 0x3308f8cb + 502
8 UIKit 0x3308fdb9 + 488
9 UIKit 0x32fb85f9 + 524
10 UIKit 0x32fa58e1 + 380
11 UIKit 0x32fa51ef + 6198
12 GraphicsServices 0x34cbc5f7 + 590
13 GraphicsServices 0x34cbc227 + 34
14 CoreFoundation 0x3116b3e7 + 34
15 CoreFoundation 0x3116b38b + 138
16 CoreFoundation 0x3116a20f + 1382
17 CoreFoundation 0x310dd23d CFRunLoopRunSpecific + 356
18 CoreFoundation 0x310dd0c9 CFRunLoopRunInMode + 104
19 GraphicsServices 0x34cbb33b GSEventRunModal + 74
20 UIKit 0x32ff92b9 UIApplicationMain + 1120
21 myshine 0x00026ec7 myshine + 16071
22 myshine 0x00025660 myshine + 9824
)
through i know NSArray beyond bounds,but my app have many many NSArray,and they are user report,can you give me some easy methods to find the location?
From your question what I understood is you want the method which has produced the crash in your app. May be this can help you Symbolicating iPhone App Crash Reports.

Crash when switch to AirPlay

I'm working on app that streaming audio. I've MPVolumeView with AirPlay button. But sometimes app crashes when switch to airplay.
0 libobjc.A.dylib 0x394455d0 objc_msgSend + 16
1 Foundation 0x39f05040 +[NSObject(NSDelayedPerforming) cancelPreviousPerformRequestsWithTarget:selector:object:] + 336
2 MediaPlayer 0x381d43b0 -[MPAudioDeviceController _scheduleSendDelegateAudioRoutesChanged] + 52
3 CoreFoundation 0x3ac90346 _CFXNotificationPost + 1418
4 Foundation 0x39f0538a -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
5 Celestial 0x35d3c0a4 -[AVObjectRegistry safePostNotificationFromMainThreadTarget:name:userInfo:] + 92
6 Celestial 0x35d41970 figConnection_ActiveAudioRouteDidChange_Callback + 112
7 CoreFoundation 0x3ad0c0a2 __CFNotificationCenterAddObserver_block_invoke_0 + 122
8 CoreFoundation 0x3ac90346 _CFXNotificationPost + 1418
9 CoreFoundation 0x3ac91918 CFNotificationCenterPostNotification + 100
10 CoreMedia 0x3a111c96 CMNotificationCenterPostNotification + 114
11 MediaToolbox 0x33ccae16 playerasync_reflectSubPlayerNotification + 118
12 CoreFoundation 0x3ad0c0a2 __CFNotificationCenterAddObserver_block_invoke_0 + 122
13 CoreFoundation 0x3ac90346 _CFXNotificationPost + 1418
14 CoreFoundation 0x3ac91918 CFNotificationCenterPostNotification + 100
15 CoreMedia 0x3a111c96 CMNotificationCenterPostNotification + 114
16 MediaToolbox 0x33ccad92 playerremote_postNotification + 554
17 MediaToolbox 0x33cccd28 playerremote_postNotificationWithPayload + 84
18 MediaToolbox 0x33cca2ce FigPlayerRemoteCallbacksServer_SendNotifyPing + 370
19 MediaToolbox 0x33cca14e _XSendNotifyPing + 66
20 MediaToolbox 0x33cc74de figmoviecallbacks_server + 90
21 MediaToolbox 0x33cc7468 fpr_ClientPortCallBack + 176
22 CoreFoundation 0x3ad09888 __CFMachPortPerform + 116
23 CoreFoundation 0x3ad143e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
24 CoreFoundation 0x3ad14386 __CFRunLoopDoSource1 + 134
25 CoreFoundation 0x3ad1320a __CFRunLoopRun + 1378
26 CoreFoundation 0x3ac86238 CFRunLoopRunSpecific + 352
27 CoreFoundation 0x3ac860c4 CFRunLoopRunInMode + 100
28 GraphicsServices 0x36f8c336 GSEventRunModal + 70
29 UIKit 0x34a9328c UIApplicationMain + 1116
30 RogApp 0x0006a0ba main (main.m:17)
31 RogApp 0x0006a034 start + 36
I've enabled zombie objects and after crash I see message like this:
[MPAudioDeviceController performSelector:withObject:afterDelay:inModes:] message sent to deallocated instance
This is private class. How can I fix this bug?
FWIW, I am getting essentially the same crash reports from the field with an app. I did not know what it was related to, but now I can at least explore switching to AirPlay to drive it.

how to interpret this crash log of iphone

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x00004420 objc_msgSend + 24
1 CoreFoundation 0x000042a6 CFRetain + 54
2 CoreFoundation 0x0000a9f0 __CFBasicHashStandardRetainValue + 8
3 CoreFoundation 0x000054c0 __CFBasicHashAddValue + 100
4 CoreFoundation 0x00006184 CFBasicHashAddValue + 276
5 CoreFoundation 0x00006cfe CFDictionaryCreate + 58
6 CoreFoundation 0x00033d7c -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 1456
7 CoreFoundation 0x000361bc -[NSDictionary initWithObjectsAndKeys:] + 776
8 iota 0x0000cb04 -[CorpDirViewController reloadDisplayList] (CorpDirViewController.m:833)
9 iota 0x000098ba -[CorpDirViewController refreshDataAndDisplay] (CorpDirViewController.m:134)
10 iota 0x00009b62 -[CorpDirViewController handleNotication:] (CorpDirViewController.m:197)
11 Foundation 0x00015432 _nsnote_callback + 150
12 CoreFoundation 0x000271da __CFXNotificationPost_old + 390
13 CoreFoundation 0x00026e7a _CFXNotificationPostNotification + 122
14 Foundation 0x0000b9f6 -[NSNotificationCenter postNotification:] + 138
15 Foundation 0x0007ae02 postQueueNotifications + 258
16 Foundation 0x0007afae __NSPostIdleQueueNotes + 6
17 CoreFoundation 0x00031084 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12
18 CoreFoundation 0x00030eb2 __CFRunLoopDoObservers + 494
19 CoreFoundation 0x00028206 __CFRunLoopRun + 934
20 CoreFoundation 0x00027d74 CFRunLoopRunSpecific + 220
21 CoreFoundation 0x00027c82 CFRunLoopRunInMode + 54
22 GraphicsServices 0x00004e84 GSEventRunModal + 188
23 UIKit 0x00004f8c -[UIApplication _run] + 564
24 UIKit 0x000024cc UIApplicationMain + 964
25 iota 0x00005582 main (main.m:17)
26 iota 0x00005544 0x1000 + 17732
From the looks of the log, you have overreleased something and that is causing a crash. Take a look at this line in your code:
8 iota 0x0000cb04 -[CorpDirViewController reloadDisplayList] (CorpDirViewController.m:833)
Which has the file and the line of code affected:
[CorpDirViewController reloadDisplayList] (CorpDirViewController.m:833)