Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

iOS Build crashes on building in Xcode 10 with IL2CPP using Unity 2018.3b3

Discussion in '2018.3 Beta' started by F_J, Oct 2, 2018.

  1. F_J

    F_J

    Joined:
    Apr 29, 2016
    Posts:
    9
    Hi,

    I get the following bug on Xcode 10 (10A255) while creating an empty project with only a single UI text in unity 2018.3 Beta.

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
    *** First throw call stack:
    (
    0 CoreFoundation 0x000000011246d29b __exceptionPreprocess + 331
    1 libobjc.A.dylib 0x0000000111975735 objc_exception_throw + 48
    2 CoreFoundation 0x00000001123b78fc _CFThrowFormattedException + 194
    3 CoreFoundation 0x00000001124467ed -[__NSPlaceholderArray initWithObjects:count:] + 237
    4 CoreFoundation 0x000000011245b3d4 +[NSArray arrayWithObjects:count:] + 52
    5 Test 0x00000001048982e1 get_Alldata + 116
    6 Test 0x0000000105274b01 PlatformInfoDispatcher_get_Alldata_mA1ACDACE9E149CB7D834556037EB110C7A358E6F + 17
    7 Test 0x00000001052750da PlatformInfoDispatcher_ReportAnalyticsData_m87A1A2582357F9B813ECA796A1A96E8EC15711DC + 122
    8 Test 0x0000000105276357 PlatformInfoInitialization_OnRuntimeInitializeOnLoad_mB2D0B65CCCDE0F92AEFBD4A64B46B7B8B506098C + 55
    9 Test 0x00000001046aa1c2 _Z66RuntimeInvoker_FalseVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4_ + 34
    10 Test 0x00000001047727ba _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 106
    11 libiPhone-lib.dylib 0x000000010dd03b88 _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 108
    12 libiPhone-lib.dylib 0x000000010da9fac9 _ZN30RuntimeInitializeOnLoadManager23ExecuteInitializeOnLoadENSt3__16vectorIi13stl_allocatorIiL18MemLabelIdentifier13ELi16EEEE + 269
    13 libiPhone-lib.dylib 0x000000010da9f947 _ZN30RuntimeInitializeOnLoadManager23ExecuteInitializeOnLoadE25RuntimeInitializeLoadType + 127
    14 libiPhone-lib.dylib 0x000000010dac7e31 _ZN18LoadSceneOperation19IntegrateMainThreadEv + 345
    15 libiPhone-lib.dylib 0x000000010dac8f50 _ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsEi + 304
    16 libiPhone-lib.dylib 0x000000010dac9749 _ZN14PreloadManager16UpdatePreloadingEv + 269
    17 libiPhone-lib.dylib 0x000000010e1303b5 _ZL19UnityPlayerLoopImplb + 121
    18 Test 0x000000010431a29b UnityRepaint + 59
    19 Test 0x000000010431a24e -[UnityAppController(Rendering) repaint] + 110
    20 Test 0x000000010431a19b -[UnityAppController(Rendering) repaintDisplayLink] + 91
    21 QuartzCore 0x000000010cbfd1d4 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 818
    22 QuartzCore 0x000000010ccc6de4 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 297
    23 CoreFoundation 0x00000001123a49b6 __CFMachPortPerform + 150
    24 CoreFoundation 0x00000001123d1379 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    25 CoreFoundation 0x00000001123d09cb __CFRunLoopDoSource1 + 459
    26 CoreFoundation 0x00000001123caf3e __CFRunLoopRun + 2526
    27 CoreFoundation 0x00000001123ca221 CFRunLoopRunSpecific + 625
    28 GraphicsServices 0x0000000112b471dd GSEventRunModal + 62
    29 UIKitCore 0x000000011dea0115 UIApplicationMain + 140
    30 Test 0x0000000104307ef9 main + 217
    31 libdyld.dylib 0x00000001136f5551 start + 1
    32 ??? 0x0000000000000001 0x0 + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    (lldb)

    -------------------------------------------------------------

    I export the project as a simulator with OpenGLES2 on macOS Mojave Version 10.14

    Initially, I thought the bug was with only the simulator setup. However, it crashes on real devices as well, in fact, it crashes on iPhone 7 but not on iPad and iPhone 8. Not sure about the new iPhone, don't own it.

    After exporting it to Xcode the only thing I do is select the signing option and add "-ObjC" in "Other Linker Flags" (skipping this kept doesn't solve the issue).

    I get the null exception on the following line in "main.mm":

    UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String: AppControllerClassName]);

    I am trying to solve this issue for a week now but no luck. I really need help.

    This bug occurs on 2018.3b2 as well.
     
    AlkisFortuneFish likes this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    First of all, thank you for bringing this to our attention. Secondly, please use the bug reporter to report bugs. The forums are not really suitable for this purpose. You can write about issues with 2018.3 here to bring further attention to it, but if there's no bug report, there's a higher risk that it will be overlooked or forgotten. A guide to beta testing.

    If you decide to submit a bug report it would be a good idea to post the issue ID in this thread as well.
     
    JurreFonk likes this.
  3. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    173
    This crash is caused by the analytics packaged. It should be fixed in 3.1.2 (not sure if out yet), alternatively you can just disable the whole package in `Package Manager -> Built-in packages`.
     
  4. Shaun-Peoples

    Shaun-Peoples

    Joined:
    Feb 26, 2013
    Posts:
    24
    Ran into the same thing (it seems) with cloud build, posting error for others - disabled the package for now and building.


    19538: ❌; ld: bitcode bundle could not be generated because '/BUILD_PATH/blahblahblah.com.ios-2018-3-beta/temp.XXXXXX20181027-9368-1epv66v/Libraries/com.unity.analytics/iOS/platforminfo.a(PlatformInfo.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
    19539: ❌; clang: error: linker command failed with exit code 1 (use -v to see invocation)