Crashes on AppLaunch


#1

For some users the app is crashing on launch

I got this error for some user on the app store build. After that I have done the “compact on launch” and added all the realm operations running on DispatchQueue in autoreleasepool{…}. I can not make the users to reinstall the app

Fatal Exception: RLMException
0  CoreFoundation                 0x1824f2d8c __exceptionPreprocess
1  libobjc.A.dylib                0x1816ac5ec objc_exception_throw
2  AMS-Sales                      0x105584e9c RLMSetErrorOrThrow(NSError*, NSError* __autoreleasing*) (RLMUtil.mm:336)
3  AMS-Sales                      0x10555cfe0 RLMRealmTranslateException(NSError* __autoreleasing*) (RLMRealm.mm:316)
4  AMS-Sales                      0x10555e2cc translateSharedGroupOpenException(RLMRealmConfiguration*, NSError* __autoreleasing*) (RLMRealm.mm:355)
5  AMS-Sales                      0x10555e064 +[RLMRealm realmWithConfiguration:error:] (RLMRealm.mm:405)
6  AMS-Sales                      0x10555c564 +[RLMRealm defaultRealm] (RLMRealm.mm:177)
7  AMS-Sales                      0x104f1c238 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:292)
8  UIKit                          0x18c101dbc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]
9  UIKit                          0x18c1011c4 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:]
10 UIKit                          0x18c0ce5e0 -[UIApplication _runWithMainScene:transitionContext:completion:]
11 UIKit                          0x18c6feb1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
12 UIKit                          0x18c0cddd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:]
13 UIKit                          0x18c0cdc6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]
14 UIKit                          0x18c0ccafc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:]
15 UIKit                          0x18cd6284c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
16 UIKit                          0x18c0cc1ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
17 UIKit                          0x18cb47ac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
18 UIKit                          0x18cc95bf8 _performActionsWithDelayForTransitionContext
19 UIKit                          0x18c0cbc0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
20 UIKit                          0x18c0cb5a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
21 UIKit                          0x18c0c85e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:]
22 UIKit                          0x18c0c8330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]
23 FrontBoardServices             0x184cf4470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:]
24 FrontBoardServices             0x184cfcd6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2
25 libdispatch.dylib              0x181de4a60 _dispatch_client_callout
26 libdispatch.dylib              0x181dec170 _dispatch_block_invoke_direct$VARIANT$mp
27 FrontBoardServices             0x184d28878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
28 FrontBoardServices             0x184d2851c -[FBSSerialQueue _performNext]
29 FrontBoardServices             0x184d28ab8 -[FBSSerialQueue _performNextFromRunLoopSource]
30 CoreFoundation                 0x18249b404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
31 CoreFoundation                 0x18249ac2c __CFRunLoopDoSources0
32 CoreFoundation                 0x18249879c __CFRunLoopRun
33 CoreFoundation                 0x1823b8da8 CFRunLoopRunSpecific
34 GraphicsServices               0x18439e020 GSEventRunModal
35 UIKit                          0x18c3d8758 UIApplicationMain
36 AMS-Sales                      0x10502791c main (main.m:52)
37 libdyld.dylib                  0x181e49fc0 start