Post

Replies

Boosts

Views

Activity

-[MyClassName persistentStoreCoordinator].cold.1 Crash
Hi Team,I am struggling to find the reason of crash of my iOS app. The crash is not reprodicible in any of iOS devices.Crash Log is: Crashed: com.apple.main-thread SIGABRT ABORT 0x000000019d8fbec4Crashed: com.apple.main-thread0 libsystem_kernel.dylib 0x19d8fbec4 __pthread_kill + 81 libsystem_pthread.dylib 0x19d8171d8 pthread_kill$VARIANT$mp + 1362 libsystem_c.dylib 0x19d76b844 abort + 1003 WDIV 0x102d90cf0 -[DataManager persistentStoreCoordinator].cold.1 + 43076845924 WDIV 0x1029a9e94 -[DataManager mainObjectContext] + 78 (DataManager.m:78)5 WDIV 0x1029a9f08 -[DataManager mainObjectContext] + 91 (DataManager.m:91)6 WDIV 0x1029ff1d8 -[DataDownloadManager getDataForEntity:] + 1321 (DataDownloadManager.m:1321)7 WDIV 0x102a00300 -[DataDownloadManager getMetNotificationId] + 1517 (DataDownloadManager.m:1517)8 WDIV 0x102a00b1c -[DataDownloadManager deleteWeatherData] + 1602 (DataDownloadManager.m:1602)9 WDIV 0x102a00a08 -[DataDownloadManager deleteAlertsData] + 1588 (DataDownloadManager.m:1588)10 WDIV 0x102a8cae8 -[AppDelegate application:didFinishLaunchingWithOptions:] + 185 (AppDelegate.m:185)11 UIKitCore 0x1a1b80ee4 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 34012 UIKitCore 0x1a1b82ca0 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 507613 UIKitCore 0x1a1b8842c -[UIApplication _runWithMainScene:transitionContext:completion:] + 124814 UIKitCore 0x1a1355208 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 14815 UIKitCore 0x1a17eb698 _UIScenePerformActionsWithLifecycleActionMask + 10016 UIKitCore 0x1a1355cf0 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 19617 UIKitCore 0x1a13557fc -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 47618 UIKitCore 0x1a1355b1c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 73619 UIKitCore 0x1a13553d8 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 33620 UIKitCore 0x1a13598c4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 18821 UIKitCore 0x1a171cf08 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 82422 UIKitCore 0x1a1804c84 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 24423 UIKitCore 0x1a13595fc __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 13624 UIKitCore 0x1a1804b80 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 10025 UIKitCore 0x1a1359468 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 37626 UIKitCore 0x1a11cb2c0 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 63627 UIKitCore 0x1a11c9e28 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 24828 UIKitCore 0x1a11caff8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 22029 UIKitCore 0x1a1b867e4 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 54830 UIKitCore 0x1a173d900 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 36031 FrontBoardServices 0x1a2c377a0 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 43632 FrontBoardServices 0x1a2c5c838 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 10033 FrontBoardServices 0x1a2c41f04 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 23234 FrontBoardServices 0x1a2c5c4f4 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 31235 libdispatch.dylib 0x19d7d1184 _dispatch_client_callout + 1636 libdispatch.dylib 0x19d779fd8 _dispatch_block_invoke_direct$VARIANT$mp + 22437 FrontBoardServices 0x1a2c81418 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 4038 FrontBoardServices 0x1a2c810e4 -[FBSSerialQueue _queue_performNextIfPossible] + 40439 FrontBoardServices 0x1a2c8160c -[FBSSerialQueue _performNextFromRunLoopSource] + 2840 CoreFoundation 0x19da82a00 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 2441 CoreFoundation 0x19da82958 __CFRunLoopDoSource0 + 8042 CoreFoundation 0x19da820f0 __CFRunLoopDoSources0 + 18043 CoreFoundation 0x19da7d23c __CFRunLoopRun + 108044 CoreFoundation 0x19da7cadc CFRunLoopRunSpecific + 46445 GraphicsServices 0x1a7a1d328 GSEventRunModal + 10446 UIKitCore 0x1a1b8a63c UIApplicationMain + 193647 WDIV 0x102a0d7c4 main + 15 (main.m:15)48 libdyld.dylib 0x19d906360 start + 4DataManager -> Line number 78 is start of following method:78 - (NSManagedObjectContext *)mainObjectContext79 {80 if (_mainObjectContext)81 return _mainObjectContext;8283 if (![NSThread isMainThread]) {84 [self performSelectorOnMainThread:@selector(mainObjectContext)85 withObject:nil86 waitUntilDone:YES];87 return _mainObjectContext;88 }8990 _mainObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];91 [_mainObjectContext setPersistentStoreCoordinator:self.persistentStoreCoordinator];92 93 return _mainObjectContext;94 }DataManager -> Ther is one more method which can be useful for tracing crash:- (NSPersistentStoreCoordinator *)persistentStoreCoordinator{ if (_persistentStoreCoordinator) return _persistentStoreCoordinator; NSString *storePath = [[self sharedDocumentsPath] stringByAppendingPathComponent:kDataManagerSQLiteName]; NSURL *storeURL = [NSURL fileURLWithPath:storePath]; NSDictionary *option = @{NSMigratePersistentStoresAutomaticallyOption: @YES, NSInferMappingModelAutomaticallyOption: @YES}; NSError *error = nil; _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:self.objectModel]; if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:option error:&error]) { [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]; if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:option error:&error]) { NSLog(@"Fatal error while creating persistent store: %@", error); abort(); } } return _persistentStoreCoordinator;}
1
0
904
Apr ’20