[SOLVED] iOS app crashes only when opening from TestFlight

It’s very puzzling. App works normally but crashes when opening from Testflight.

I read it could be related to BITCODE, but I have no idea how Defold handles this BITCODE parameter.

Can anyone help? Thanks

Defold version: 1.2.186
iOS version: 14.7.1

EDIT: SOLVED. Problem was coming from the IAC extension that is buggy.

This is the crashlog

 <Notice>: INFO:CRASH: Successfully wrote Crashdump to file: /var/mobile/Containers/Data/Application/AAE5E0A4-11ED-4F5A-89D0-3C5D9D9A6DB6/Library/Application Support/
 <Notice>: ERROR:CRASH: CALL STACK:
 <Notice>: ERROR:CRASH: 0   testCards                        0x00000001012716d8 _ZN7dmCrash7OnCrashEi + 104
 <Notice>: ERROR:CRASH: 1   libsystem_platform.dylib            0x000000022bd429fc <redacted> + 56
 <Notice>: ERROR:CRASH: 2   libsystem_pthread.dylib             0x000000022bd48094 <redacted> + 380
 <Notice>: ERROR:CRASH: 3   libsystem_c.dylib                   0x000000022bc27ea8 abort + 140
 <Notice>: ERROR:CRASH: 4   libsystem_c.dylib                   0x000000022bbf5b58 basename_r + 0
 <Notice>: ERROR:CRASH: 5   testCards                        0x0000000101250f84 _ZN7dmMutex4LockEPNS_5MutexE + 60
 <Notice>: ERROR:CRASH: 6   testCards                        0x0000000100ec232c _Z14IAC_Queue_PushP15IACCommandQueueP10IACCommand + 36
 <Notice>: ERROR:CRASH: 7   testCards                        0x0000000100ec1e40 -[IACAppDelegate application:willFinishLaunchingWithOptions:] + 284
 <Notice>: ERROR:CRASH: 8   testCards                        0x00000001012531dc +[AppDelegateProxy application:willFinishLaunchingWithOptions:] + 140
 <Notice>: ERROR:CRASH: 9   UIKitCore                           0x0000000258b81044 <redacted> + 240
 <Notice>: ERROR:CRASH: 10  UIKitCore                           0x0000000258b82854 <redacted> + 3352
 <Notice>: ERROR:CRASH: 11  UIKitCore                           0x0000000258b87fe0 <redacted> + 1540
 <Notice>: ERROR:CRASH: 12  UIKitCore                           0x000000025844b2a4 <redacted> + 776
 <Notice>: ERROR:CRASH: 13  UIKitCore                           0x000000025845383c <redacted> + 160
 <Notice>: ERROR:CRASH: 14  UIKitCore                           0x000000025844af28 <redacted> + 236
 <Notice>: ERROR:CRASH: 15  UIKitCore                           0x000000025844b818 <redacted> + 1064
 <Notice>: ERROR:CRASH: 16  UIKitCore                           0x0000000258449b64 <redacted> + 744
 <Notice>: ERROR:CRASH: 17  UIKitCore                           0x000000025844982c <redacted> + 428
 <Notice>: ERROR:CRASH: 18  UIKitCore                           0x000000025844e36c <redacted> + 220
 <Notice>: ERROR:CRASH: 19  UIKitCore                           0x000000025844f150 _performActionsWithDelayForTransitionContext + 112
 <Notice>: ERROR:CRASH: 20  UIKitCore                           0x000000025844e224 <redacted> + 244
 <Notice>: ERROR:CRASH: 21  UIKitCore                           0x0000000258452f24 <redacted> + 360
 <Notice>: ERROR:CRASH: 22  UIKitCore                           0x0000000258b865e8 <redacted> + 540
 <Notice>: ERROR:CRASH: 23  UIKitCore                           0x0000000258782e04 <redacted> + 360
 <Notice>: ERROR:CRASH: 24  FrontBoardServices                  0x000000022eaae9fc <redacted> + 440
 <Notice>: ERROR:CRASH: 25  FrontBoardServices                  0x000000022eab840c <redacted> + 256
 <Notice>: ERROR:CRASH: 26  FrontBoardServices                  0x000000022eab7c14 <redacted> + 64
 <Notice>: ERROR:CRASH: 27  libdispatch.dylib                   0x000000022bb717d4 <redacted> + 16
 <Notice>: ERROR:CRASH: 28  libdispatch.dylib                   0x000000022bb165dc <redacted> + 224
 <Notice>: ERROR:CRASH: 29  FrontBoardServices                  0x000000022eae9040 <redacted> + 40
 <Notice>: ERROR:CRASH: 30  FrontBoardServices                  0x000000022eae8cdc <redacted> + 408
 <Notice>: ERROR:CRASH: 31  FrontBoardServices                  0x000000022eae9294 <redacted> + 52
 <Notice>: ERROR:CRASH: 32  CoreFoundation                      0x000000022c0c4728 <redacted> + 24
 <Notice>: ERROR:CRASH: 33  CoreFoundation                      0x000000022c0c46a8 <redacted> + 88
 <Notice>: ERROR:CRASH: 34  CoreFoundation                      0x000000022c0c3f90 <redacted> + 176
 <Notice>: ERROR:CRASH: 35  CoreFoundation                      0x000000022c0beecc <redacted> + 1004
 <Notice>: ERROR:CRASH: 36  CoreFoundation                      0x000000022c0be7c0 CFRunLoopRunSpecific + 436
 <Notice>: ERROR:CRASH: 37  GraphicsServices                    0x000000022e2bf79c GSEventRunModal + 104
 <Notice>: ERROR:CRASH: 38  UIKitCore                           0x0000000258b89c38 UIApplicationMain + 212
 <Notice>: ERROR:CRASH: 39  testCards                        0x0000000100e7f160 _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE + 44
 <Notice>: ERROR:CRASH: 40  testCards                        0x0000000100e7f120 _Z11engine_mainiPPc + 96
 <Notice>: ERROR:CRASH: 41  libdyld.dylib                       0x000000022bb828e0 <redacted> + 4
<Notice>: ERROR:CRASH:
<Notice>: Connection removed: IOHIDEventSystemConnection uuid:AAF85A3C-63BB-447D-A0B7-B0F0E18A2C59 pid:1961 process:testCards type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 364 attributes:<CFBasicHash 0x102d5b4e0 [0x102c00010]>{type = immutable dict, count = 3,
entries =>
	0 : <CFString 0x10afa8260 [0x25c9a1430]>{contents = "pid"} = <CFNumber 0xef9bdf1d7ff82717 [0x25c9a1430]>{value = +1961, type = kCFNumberSInt64Type}
	1 : <CFString 0x10af1f2d0 [0x25c9a1430]>{contents = "bundleID"} = <CFString 0x10af62c70 [0x25c9a1430]>{contents = "com.test.hearthstone.card"}
	2 : <CFString 0x10af7b170 [0x25c9a1430]>{contents = "HighFrequency"} = <CFBoolean 0x25c9a6ff8 [0x25c9a1430]>{value = false}
}
 inactive:0
 <Notice>: Client relinquished <BKProcessAssertion: 0x100e5a9b0; "Deliver Message" (suspend:10s); id:\M-b\M^@\M-&878BA9197E0C>
 <Notice>: [testCards:1961] Deactivate assertion: <BKProcessAssertion: 0x100e5a9b0; "Deliver Message" (suspend:10s); id:\M-b\M^@\M-&878BA9197E0C>
 <Notice>: [testCards:1961] Setting jetsam priority to 10 [0x10100]
 <Notice>: [testCards:1961] Remove assertion: <BKProcessAssertion: 0x100e5a9b0; "Deliver Message" (suspend:10s); id:\M-b\M^@\M-&878BA9197E0C>
 <Notice>: -[BKAssertion dealloc] - <0x100e5a9b0>
 <Notice>: [testCards:1961] Setting jetsam priority to 10 [0x100]
 <Notice>: [testCards:1961] setpriority(PRIO_DARWIN_ROLE, 1961, 3): ok
 <Notice>: [BKEventFocusManager] Setting foreground application to: (none) (-1)
iPhone mobilewatchdog[64] <Notice>: 100833478150041: id=@ pid=48705776, state=1961
iPhone SpringBoard(KeyboardArbiter)[52] <Error>: HW kbd: Failed to set (null) as keyboard focus
iPhone SpringBoard(WiFiPicker)[52] <Notice>: WIFI PICKER [com.test.hearthstone.card]: isProcessLaunch: 0,    isForegroundActivation: 0,     isForegroundDeactivation: 1
iPhone symptomsd(SymptomEvaluator)[1115] <Error>: Can't get most elevated app state from dictionary {
    BKSApplicationStateExtensionKey = 0;
    SBApplicationStateDisplayIDKey = "com.test.hearthstone.card";
    SBApplicationStateKey = 0;
    SBApplicationStateProcessIDKey = 1961;
    SBApplicationStateRunningReasonsKey =     (
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = Resume;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        },
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = UIApplicationLaunch;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        }
    );
}

Also, it doesn’t happen on every device.
Another device iOS 14.6, doesn’t happen.

The IAC extension is rarely used, so there might very well be a bug in there somewhere. Could you please create a bug report in the repo?

1 Like

Yes! The issue came from using this extension.
Will file a bug report!
Thanks for your help.

2 Likes