Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

UnityDefaultViewController should be used only if unity is set to autorotate

Discussion in 'iOS and tvOS' started by maadigitial, Oct 16, 2020.

  1. maadigitial

    maadigitial

    Joined:
    Apr 4, 2014
    Posts:
    4
    HI when I build my IOS project from unity 2019.4.12f and autorotate is turned on the following crash occurs:

    2020-10-16 14:04:04.915564+0100 ****************[724:237253] *** Assertion failure in -[UnityDefaultViewController supportedInterfaceOrientations], UnityViewControllerBase+iOS.mm:111

    2020-10-16 14:04:04.923759+0100 ****************[724:237253] Uncaught exception: NSInternalInconsistencyException: UnityDefaultViewController should be used only if unity is set to autorotate

    (

    0 CoreFoundation 0x00000001ab7ee9a0 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 1227168

    1 libobjc.A.dylib 0x00000001ab5170a4 objc_exception_throw + 56

    2 CoreFoundation 0x00000001ab6f0d1c DA838E75-6B30-360E-9661-C4800A7E1BF6 + 187676

    3 Foundation 0x00000001abb268f4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 555252

    4 UnityFramework 0x000000010611ce88 -[UnityDefaultViewController supportedInterfaceOrientations] + 120

    5 UnityFramework 0x0000000106112474 -[UnityAppController application:supportedInterfaceOrientationsForWindow:] + 164

    6 UIKitCore 0x00000001af7ff210 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10437136

    7 UIKitCore 0x00000001af2086d4 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4183764

    8 UIKitCore 0x00000001af208e14 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4185620

    9 UIKitCore 0x00000001af209450 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4187216

    10 UIKitCore 0x00000001af1f5cb8 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4107448

    11 UIKitCore 0x00000001afc7d048 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15147080

    12 UIKitCore 0x00000001afc7ce28 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15146536

    13 UIKitCore 0x00000001afc711d4 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15098324

    14 UIKitCore 0x00000001afc710bc 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15098044

    15 UIKitCore 0x00000001afc7f9c4 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15157700

    16 UIKitCore 0x00000001af213380 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4227968

    17 UIKitCore 0x00000001af21a9d4 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4258260

    18 UIKitCore 0x00000001af327070 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 5357680

    19 UIKitCore 0x00000001af21a964 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4258148

    20 UIKitCore 0x00000001afc789c0 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15129024

    21 UIKitCore 0x00000001af21a7cc 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4257740

    22 UIKitCore 0x00000001af112bf4 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 3177460

    23 UIKitCore 0x00000001af118374 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 3199860

    24 UIKitCore 0x00000001af112040 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 3174464

    25 UIKitCore 0x00000001af10f480 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 3163264

    26 UIKitCore 0x00000001af832128 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10645800

    27 UIKitCore 0x00000001af8332b8 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10650296

    28 UnityFramework 0x000000010610a13c -[UnityAppController(ViewHandling) transitionToViewController:] + 200

    29 UnityFramework 0x000000010610a7ac -[UnityAppController(OrientationSupport) orientInterface:] + 176

    30 UnityFramework 0x000000010610a6bc -[UnityAppController(OrientationSupport) checkOrientationRequest] + 476

    31 UnityFramework 0x0000000106109f78 -[UnityAppController(ViewHandling) showGameUI] + 44

    32 UnityFramework 0x00000001061120f0 -[UnityAppController startUnity:] + 124

    33 Foundation 0x00000001abbc3874 __NSFireDelayedPerform + 412

    34 CoreFoundation 0x00000001ab76ce1c DA838E75-6B30-360E-9661-C4800A7E1BF6 + 695836

    35 CoreFoundation 0x00000001ab76cb58 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 695128

    36 CoreFoundation 0x00000001ab76c228 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 692776

    37 CoreFoundation 0x00000001ab767364 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 672612

    38 CoreFoundation 0x00000001ab7668bc CFRunLoopRunSpecific + 464

    39 GraphicsServices 0x00000001b55d1328 GSEventRunModal + 104

    40 UIKitCore 0x00000001af7fb6d4 UIApplicationMain + 1936

    41 UnityFramework 0x00000001061175e8 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108

    42 keeleexpansion 0x0000000104ae3e1c main + 68

    43 libdyld.dylib 0x00000001ab5f1460 3A812C94-1633-3A55-9831-B451E9A59F3C + 5216

    )

    2020-10-16 14:04:04.924492+0100 ****************[724:237253] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UnityDefaultViewController should be used only if unity is set to autorotate'

    *** First throw call stack:

    (0x1ab7ee98c 0x1ab5170a4 0x1ab6f0d1c 0x1abb268f4 0x10611ce88 0x106112474 0x1af7ff210 0x1af2086d4 0x1af208e14 0x1af209450 0x1af1f5cb8 0x1afc7d048 0x1afc7ce28 0x1afc711d4 0x1afc710bc 0x1afc7f9c4 0x1af213380 0x1af21a9d4 0x1af327070 0x1af21a964 0x1afc789c0 0x1af21a7cc 0x1af112bf4 0x1af118374 0x1af112040 0x1af10f480 0x1af832128 0x1af8332b8 0x10610a13c 0x10610a7ac 0x10610a6bc 0x106109f78 0x1061120f0 0x1abbc3874 0x1ab76ce1c 0x1ab76cb58 0x1ab76c228 0x1ab767364 0x1ab7668bc 0x1b55d1328 0x1af7fb6d4 0x1061175e8 0x104ae3e1c 0x1ab5f1460)

    libc++abi.dylib: terminating with uncaught exception of type NSException

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UnityDefaultViewController should be used only if unity is set to autorotate'

    terminating with uncaught exception of type NSException

    (lldb)
     
    AytoMaximo likes this.
  2. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    Same issue with 2019.4.11 and 12
     
    Last edited: Oct 18, 2020
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    can you bug report it with small repro project? we didnt see this happening internally
     
  4. silvio_HARDlight

    silvio_HARDlight

    Joined:
    Jun 11, 2018
    Posts:
    6
    @Alexey @AytoMaximo any update on this? I'm experiencing something very similar. Just setting the Screen.orientation in an Awake method of a script when booting the game. Game is built with autorotation on and LandscapeLeft and LandscapeRight. I'm on 2020.3.12f1.

    There's a similar post but there's no follow up there either https://forum.unity.com/threads/potential-orientation-bugs.1003837/

    Can this issue be related somehow? Someone commented few months ago that he's still experiencing the issue https://issuetracker.unity3d.com/is...round-if-its-launched-in-forced-portrait-mode
     
    Last edited: Sep 29, 2021
  5. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    >>any update on this?
    well, can you bug report it with small repro project? ;-)

    >>Can this issue be related somehow? Someone commented few months ago that he's still experiencing the issue https://issuetracker.unity3d.com/is...round-if-its-launched-in-forced-portrait-mode

    the fix was implemented/backported only in 2021.2/2021.1. But the issue was NOT reproducible on earlier versions, so the bug itself would be different, so see above