Forum Xamarin.iOS

Application crash in release mode but not in debug mode ( EXC_CRASH (SIGABRT) )

zank_stzank_st Member ✭✭

When I try to execute the app in release mode instead than debug mode the app open and close immediately.
The app also crash only on real device and not on iPhone Simulator.

Here the crash log

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Thread 0 name:  tid_407  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001be74ad88 __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001be6631e8 pthread_kill$VARIANT$mp + 136
2   libsystem_c.dylib               0x00000001be5b66c0 __abort + 112
3   libsystem_c.dylib               0x00000001be5b6650 __abort + 0
4   ApplicationName.iOS             0x0000000105a7067c 0x102bb0000 + 49022588
5   ApplicationName.iOS             0x0000000105a65dcc 0x102bb0000 + 48979404
6   ApplicationName.iOS             0x000000010592688c 0x102bb0000 + 47671436
7   ApplicationName.iOS             0x00000001058baecc 0x102bb0000 + 47230668
8   ApplicationName.iOS             0x00000001058b98f0 0x102bb0000 + 47225072
9   ApplicationName.iOS             0x00000001058af0fc 0x102bb0000 + 47182076
10  ApplicationName.iOS             0x0000000103569fac 0x102bb0000 + 10198956
11  ApplicationName.iOS             0x00000001031505a8 0x102bb0000 + 5899688
12  ApplicationName.iOS             0x0000000103527f80 0x102bb0000 + 9928576
13  ApplicationName.iOS             0x00000001058ccd88 0x102bb0000 + 47304072
14  ApplicationName.iOS             0x000000010598d4d0 0x102bb0000 + 48092368
15  ApplicationName.iOS             0x0000000105990dd4 0x102bb0000 + 48106964
16  ApplicationName.iOS             0x0000000103114928 0x102bb0000 + 5654824
17  ApplicationName.iOS             0x00000001031150e4 0x102bb0000 + 5656804
18  UIKitCore                       0x00000001c29f6a5c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 356
19  UIKitCore                       0x00000001c29f87e8 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5048
20  UIKitCore                       0x00000001c29fe084 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1244
21  UIKitCore                       0x00000001c21a546c -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 148
22  UIKitCore                       0x00000001c2654a38 _UIScenePerformActionsWithLifecycleActionMask + 100
23  UIKitCore                       0x00000001c21a5f50 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 196
24  UIKitCore                       0x00000001c21a59a4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 288
25  UIKitCore                       0x00000001c21a5d7c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 740
26  UIKitCore                       0x00000001c21a563c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 336
27  UIKitCore                       0x00000001c21a9ad8 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 188
28  UIKitCore                       0x00000001c2578dd4 +[BSAnimationSettings+ 5918164 (UIKit) tryAnimatingWithSettings:actions:completion:] + 812
29  UIKitCore                       0x00000001c266de7c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
30  UIKitCore                       0x00000001c21a9834 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 140
31  UIKitCore                       0x00000001c266dd78 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100
32  UIKitCore                       0x00000001c21a969c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 376
33  UIKitCore                       0x00000001c2018f2c __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 636
34  UIKitCore                       0x00000001c2017acc -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
35  UIKitCore                       0x00000001c2018c64 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 220
36  UIKitCore                       0x00000001c29fc2d0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
37  UIKitCore                       0x00000001c259e284 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 360
38  FrontBoardServices              0x00000001c3acf20c -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 424
39  FrontBoardServices              0x00000001c3af3d84 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 100
40  FrontBoardServices              0x00000001c3ad97ec -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232
41  FrontBoardServices              0x00000001c3af3a40 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 312
42  libdispatch.dylib               0x00000001be61b524 _dispatch_client_callout + 16
43  libdispatch.dylib               0x00000001be5c4434 _dispatch_block_invoke_direct$VARIANT$mp + 224
44  FrontBoardServices              0x00000001c3b18440 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
45  FrontBoardServices              0x00000001c3b1810c -[FBSSerialQueue _queue_performNextIfPossible] + 404
46  FrontBoardServices              0x00000001c3b18634 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
47  CoreFoundation                  0x00000001be8d3b64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
48  CoreFoundation                  0x00000001be8d3abc __CFRunLoopDoSource0 + 80
49  CoreFoundation                  0x00000001be8d3244 __CFRunLoopDoSources0 + 184
50  CoreFoundation                  0x00000001be8ce274 __CFRunLoopRun + 788
51  CoreFoundation                  0x00000001be8cdc34 CFRunLoopRunSpecific + 424
52  GraphicsServices                0x00000001c8a1738c GSEventRunModal + 160
53  UIKitCore                       0x00000001c2a0022c UIApplicationMain + 1932
54  ApplicationName.iOS             0x00000001041a42cc 0x102bb0000 + 23020236
55  ApplicationName.iOS             0x00000001040f0a50 0x102bb0000 + 22284880
56  ApplicationName.iOS             0x00000001040f09d4 0x102bb0000 + 22284756
57  ApplicationName.iOS             0x0000000103150544 0x102bb0000 + 5899588
58  ApplicationName.iOS             0x0000000103527f80 0x102bb0000 + 9928576
59  ApplicationName.iOS             0x00000001058ccd88 0x102bb0000 + 47304072
60  ApplicationName.iOS             0x000000010598d4d0 0x102bb0000 + 48092368
61  ApplicationName.iOS             0x00000001059938dc 0x102bb0000 + 48117980
62  ApplicationName.iOS             0x00000001058aaedc 0x102bb0000 + 47165148
63  ApplicationName.iOS             0x0000000105a6d0f4 0x102bb0000 + 49008884
64  ApplicationName.iOS             0x0000000103150368 0x102bb0000 + 5899112
65  libdyld.dylib                   0x00000001be755800 start + 4

I attached the full log because is too long to paste.

Does anyone have any idea how to interpret the log or how to find where the app break?

Thanks to all

Best Answer

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    How did you collect this exception?
    4-17 lines only display the address there without the useful information as UIKitCore.
    Try to integrate some crash analytics libraries like App Center to help us capture the exceptions.

  • zank_stzank_st Member ✭✭

    This one I get show these lines with more information (the 1 attached).
    I ll try extend it with app center analytics
    Thanks @LandLu

  • zank_stzank_st Member ✭✭

    Lines 0>17

    0   libsystem_kernel.dylib          0x00000001be74ad88 __pthread_kill + 8
    1   libsystem_pthread.dylib         0x00000001be6631e8 pthread_kill$VARIANT$mp + 136
    2   libsystem_c.dylib               0x00000001be5b66c0 __abort + 112
    3   libsystem_c.dylib               0x00000001be5b6650 __abort + 0
    4   ApplicationName.iOS             0x0000000107b66e0c xamarin_initialize.cold.1 + 0
    5   ApplicationName.iOS             0x0000000107b5c55c xamarin_printf + 48956764 (runtime.m:2468)
    6   ApplicationName.iOS             0x0000000107a1d01c mono_invoke_unhandled_exception_hook + 47648796 (exception.c:1299)
    7   ApplicationName.iOS             0x00000001079b165c mono_handle_exception_internal + 47208028 (mini-exceptions.c:2778)
    8   ApplicationName.iOS             0x00000001079b0080 mono_handle_exception + 47202432 (mini-exceptions.c:3102)
    9   ApplicationName.iOS             0x00000001079a588c mono_arm_throw_exception + 47159436 (exceptions-arm64.c:400)
    10  ApplicationName.iOS             0x0000000105665d9c rethrow_preserve_exception + 172
    11  ApplicationName.iOS             0x000000010524c5a8 ApplicationName_iOS_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary + 5899688 (/<unknown>:1)
    12  ApplicationName.iOS             0x0000000105623d80 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272
    13  ApplicationName.iOS             0x00000001079c3518 mono_jit_runtime_invoke + 47281432 (mini-runtime.c:3164)
    14  ApplicationName.iOS             0x0000000107a83c60 mono_runtime_invoke_checked + 48069728 (object.c:3212)
    15  ApplicationName.iOS             0x0000000107a87564 mono_runtime_invoke + 48084324 (object.c:3099)
    16  ApplicationName.iOS             0x0000000105210928 native_to_managed_trampoline_5(objc_object*, objc_selector*, _MonoMethod**, objc_object*, objc_object*, unsigned int) + 5654824 (registrar.m:254)
    17  ApplicationName.iOS             0x00000001052110e4 -[AppDelegate application:didFinishLaunchingWithOptions:] + 5656804 (registrar.m:7409)
    
  • LandLuLandLu Member, Xamarin Team Xamurai

    I found a similar thread here:
    https://stackoverflow.com/questions/42652409/xamarin-ios-app-only-crashes-when-opened-through-testflight
    Did you manipulate the launchOptions in your application?

  • zank_stzank_st Member ✭✭

    No I didn't
    here my FinishedLaunching

    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
            {
                // Rollbar notifier configuartion
                RollbarHelper.ConfigureRollbarSingleton();
                // Registers for global exception handling.
                RollbarHelper.RegisterForGlobalExceptionHandling();
    
                global::Xamarin.Forms.Forms.Init();
    
                FormsGoogleMaps.Init("---key---");
                //Xamarin.FormsMaps.Init();
    
                FormsMaterial.Init();
                ZXing.Net.Mobile.Forms.iOS.Platform.Init();
                IQKeyboardManager.SharedManager.Enable = true;
                LoadApplication(new App());
    
                PushNotificationManager.Initialize(options, true);
                return base.FinishedLaunching(app, options);
            }
    
  • LandLuLandLu Member, Xamarin Team Xamurai
    Accepted Answer

    I noticed you integrated RollbarHelper in your project. Will it crash at release mode?
    Could you please try to remove it and have a test again?
    It's hard to find the root cause by the exceptions you post above I suggest opening a free support ticket here:
    https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6
    You could upload your project there to help us capture further information.

  • zank_stzank_st Member ✭✭

    Thanks @LandLu, after commenting RollbarHelper the app works.
    I m checking these methods to find out what went wrong.
    Thanks again

  • LandLuLandLu Member, Xamarin Team Xamurai

    If this issue has been solved by removing it could you please mark this thread to end the conversation?

Sign In or Register to comment.