Search Unity

ARKit XR Plugin 2.1.1 - "Requirement: Optional" does not work and crash on launch

Discussion in 'AR' started by Deleted User, Jul 23, 2019.

  1. Deleted User

    Deleted User

    Guest

    I have a problem to implement AR as extra feature on my existing app, which supports prior to iOS 11.
    App came to crash on launch on older iOS after implementing AR feature using ARKit XR Plugin.

    I added ARKit XR Plugin 2.1.1 with "Optional" requirement in order that my app can launch on older that iOS devices and AR feature is only availale on iOS11 and later.

    However that of exported Xcode project seems to not be "Optional". While device requirement described in Info.plist deleted, ARKit.framework is still linked as 'required.'

    Therefore I changed linking configuration in "Link binaries and libraries" manually to build the Xcode project with configuration that ARKit.framework is optional, then start the app on an iOS device prior to iOS11.

    The app failed to launch and got the error as follows:

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

    Using the debbugger, I got the stacktrace as follows:

    #0 0x000000019935f1e0 in __pthread_kill ()
    #1 0x0000000199428f0c in pthread_kill ()
    #2 0x00000001992d2b78 in abort ()
    #3 0x00000001980953f4 in abort_message ()
    #4 0x00000001980b1e98 in default_terminate_handler() ()
    #5 0x0000000198a24248 in _objc_terminate() ()
    #6 0x00000001980aef44 in std::__terminate(void (*)()) ()
    #7 0x00000001980ae85c in __cxa_throw ()
    #8 0x0000000198a24094 in objc_exception_throw ()

    #9 0x0000000183426874 in -[__NSArrayM insertObject:atIndex:] ()
    #10 0x00000001011bf830 in ConfigurationManager::ConfigurationManager() at /Users/mdurand/dev/upm-xr-arkit/Source~/UnityARKit/ConfigurationManager.mm:25
    #11 0x00000001011bfe44 in ConfigurationManager::ConfigurationManager() [inlined] at /Users/mdurand/dev/upm-xr-arkit/Source~/UnityARKit/ConfigurationManager.mm:20
    #12 0x00000001011bfe34 in __cxx_global_var_init [inlined] at /Users/mdurand/dev/upm-xr-arkit/Source~/UnityARKit/ConfigurationManager.mm:251
    #13 0x00000001011bfe34 in _GLOBAL__sub_I_ConfigurationManager.mm ()

    #14 0x000000012004c7c4 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()
    #15 0x000000012004c964 in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) ()
    #16 0x00000001200487b8 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
    #17 0x0000000120047960 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
    #18 0x0000000120047a14 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) ()
    #19 0x000000012003a090 in dyld::initializeMainExecutable() ()
    #20 0x000000012003e0ac in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
    #21 0x0000000120039044 in _dyld_start ()


    It seems that the problem occures before main function called, when initializing a gloal variale (an instance of ConfigurationManager.) I would like to know whether this crash occures due to my wrong configuration or a bug in ARKit plugin.

    This crash did not appear when using ARKit XR Plugin 1.0.0 preview27.
     
  2. QXJason

    QXJason

    Joined:
    Aug 1, 2019
    Posts:
    1
    i have same trouble。。。。。。how
     
  3. whu_liujunjie

    whu_liujunjie

    Joined:
    May 20, 2017
    Posts:
    1
    same issue
     
  4. ilvqna

    ilvqna

    Joined:
    Jun 27, 2018
    Posts:
    1
    same problem
     
  5. yanjiech07

    yanjiech07

    Joined:
    May 5, 2019
    Posts:
    9
    same problem