iOS Crash in UnityUpdateDisplayList (2017.3.0f3) - Rejection by Apple

Hi,

I’m hoping someone can help me figure out this crash that is causing my app to get rejected by Apple. It runs fine when I test it of course, and I’m not sure how to reproduce it.

Here is the symbolicated crash log:

0 squirrel 0x00000001019c27d4 UnityUpdateDisplayList (LibEntryPoint.mm:619)

1 squirrel 0x0000000100fe8cf0 -[DisplayManager updateDisplayListInUnity] (DisplayManager.mm:339)

2 squirrel 0x0000000100fe9094 -[DisplayManager screenDidConnect:] (DisplayManager.mm:378)

3 CoreFoundation 0x00000001822ed13c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20 (CFNotificationCenter.c:661)

4 CoreFoundation 0x00000001822ec6dc _CFXRegistrationPost + 420 (CFNotificationCenter.c:163)

5 CoreFoundation 0x00000001822ec440 ___CFXNotificationPost_block_invoke + 60 (CFNotificationCenter.c:1060)

6 CoreFoundation 0x0000000182369e24 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1408 (CFXNotificationRegistrar.m:163)

7 CoreFoundation 0x0000000182222d60 _CFXNotificationPost + 380 (CFNotificationCenter.c:1057)

8 Foundation 0x0000000182c4f348 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68 (NSNotification.m:543)

9 UIKit 0x000000018be50a20 +[UIScreen _FBSDisplayConfigurationConnected:andNotify:] + 280 (UIScreen.m:599)

10 UIKit 0x000000018bb79060 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 292 (UIApplication.m:3094)

11 UIKit 0x000000018bf8edbc -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364 (UIApplicationSceneClientAgent.m:41)

12 FrontBoardServices 0x0000000184a1e1f0 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364 (FBSSceneImpl.m:460)

13 FrontBoardServices 0x0000000184a26af8 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224 (FBSWorkspace.m:606)

14 libdispatch.dylib 0x0000000181cdaa14 _dispatch_client_callout + 16 (object.m:502)

15 libdispatch.dylib 0x0000000181ce2200 _dispatch_block_invoke_direct$VARIANT$mp + 288 (queue.c:3025)

16 FrontBoardServices 0x0000000184a527f8 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 36 (FBSSerialQueue.m:164)

17 FrontBoardServices 0x0000000184a5249c -[FBSSerialQueue _performNext] + 404 (FBSSerialQueue.m:196)

18 FrontBoardServices 0x0000000184a52a38 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:232)

19 CoreFoundation 0x000000018230377c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24 (CFRunLoop.c:1982)

20 CoreFoundation 0x00000001823036fc __CFRunLoopDoSource0 + 88 (CFRunLoop.c:2017)

21 CoreFoundation 0x0000000182302f84 __CFRunLoopDoSources0 + 204 (CFRunLoop.c:2053)

22 CoreFoundation 0x0000000182300b5c __CFRunLoopRun + 1048 (CFRunLoop.c:2920)

23 CoreFoundation 0x0000000182220c58 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245)

24 GraphicsServices 0x00000001840ccf84 GSEventRunModal + 100 (GSEvent.c:2245)

25 UIKit 0x000000018b9795c4 UIApplicationMain + 236 (UIApplication.m:3956)

26 squirrel 0x0000000100fdb440 main (main.mm:33)

27 libdyld.dylib 0x0000000181d4056c start + 4

Anyone have any clues? Thanks!

Look at updating your version of Unity to 2017.3.0p2. There was an issue that causes crashes in the app at launch when you ALREADY are connected to an AirPlay device (screen mirroring, etc). It only happens if you ALREADY connect to AirPlay BEFORE you launch your device. I am assuming that some App Store reviewers test things while screen mirroring to to a TV or something, and if they are already connected when they launch your app, it will cause a crash. This crash is 100% reproducible for me.

After updating to the appropriately patched versions (in my case, 2017.1.3p1), I was able to get my app launched properly without the crash.

According to this issue:
Fixed in: 2018.1.0b1
Backported to: 2017.3.0p2, 2017.2.1p2, 2017.1.3p1,Had similar problems and found that it was likely due to testers being ALREADY connected via AirPlay (screen mirroring, etc) BEFORE they launch your app. I was able to 100% reproduce this, and it seems that various versions of Unity were patched to fix it. I’ve verified that the patched version (in my case 2017.1.3p2) no longer crashes when I try the same steps.

2017.3.0p2 should fix this for you.

I have the same problem, but i can’t set Bitcode to yes. If someone found another solution pls pm me.

I also encountered the same problem, do you choose bitcode–>yes?

Yes, bitcode=yes. And as far as I can tell, the report seems to indicate that it crashed on an iPad Mini 2 (iPad 4,4). Is that true of your crash as well? Here’s the full crash log, can you share yours as well for comparison? [111995-fullcrashsym.txt|111995]

The same happened to me yesterday, my build got rejected by Apple for the same reason as you.
iPad4,4 and similar crash log.
Were you able to find a solution?

I’ve cleaned my workspace, fixed a few things and re-submitted a new build this morning, we’ll see if it gets approved. This is weird because I’ve been submitting builds regularly recently and I never got any rejection like that.

My previous bitcode = no, crash, I changed bitcode = yes, the audit did not crash.
Do not know if this is the reason

Hey, same here. I’m using Unity 2017.1.2p2 and can’t build using bitcode true. Anyone has any idea of a workaround beside bitcode changes? It really sucks that we get rejected by this.

any news on this?
we also got our app rejected while being connected to an ipv6 network on iOS 11.2.5.
we’re using Unity 5.6.5p1 and can’t set bitcode to true.

We are having same problem. We are making AR app.(Vuforia) They have rejected five of our builds due to this ‘crash’, despite the fact they are working fine on our test devices.
We tried Unity version 2.0f1, 2.1f1 and 3.01f.
If anyone reading this using Vuforia, please share your Vuforia version.

Hi everyone,

We are experiencing the exact same problem on Unity 5.5.5p1.

Our builds keep being rejected by Apple due to a “crash at launch”, and thanks to @rogerly explanations, we were able to reproduce it only when installing the app on a device connected to AirPlay before installation. It seems to occur only for the first launch.

I’m very interested in some ideas on how to manually fix this issue, or on any news about a fix in Unity5.5.5…


The crash seems to come from the DisplayManager.mm file generated by Unity, where apparently the presence of another display (AirPlay) causes an exception.

- (void)updateDisplayListInUnity
{
    // [UIScreen screens] might be out of sync to what is indicated to the
    // application via UIScreenDidConnectNotification and UIScreenDidDisconnectNotification
    // notifications. For example, on disconnection [UIScreen screens] might still
    // have the screen that the display manager no longer knows about.

    const unsigned MAX_DISPLAYS_SUPPORTED = 8; // sync this to the value on Unity side
    void* screens[MAX_DISPLAYS_SUPPORTED];
    unsigned screenCount = 0;

    UIScreen* mainScreen = [UIScreen mainScreen];
    screens[screenCount++] = (__bridge void*)mainScreen;

    for (UIScreen* screen in _displayConnection)
    {
        if (screen == mainScreen)
            continue;
        screens[screenCount++] = (__bridge void*)screen;
    }
    UnityUpdateDisplayList(screens, screenCount);
}