Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

ARKit Image Tracking Example not running on iPhone 6s

Discussion in 'Handheld AR' started by efge, Dec 7, 2018.

  1. efge

    efge

    Joined:
    Dec 13, 2007
    Posts:
    55
    The example scene from the Unity3D ARKit plugin is crashing when running on iPhone 6s.
    UnityARKitPlugin⁩/Examples⁩/⁨ARKit1.5⁩/⁨UnityARImageAnchor⁩

    UnityARImageAnchorDataFromARImageAnchorPtr
    anchorData.isTracked = [nativeAnchor isTracked] ? 1 : 0;

    Reproduced with:
    iPhone 6s
    iOS 12.1.1
    Unity 2018.2.8f1
    Unity-Technologies-unity-arkit-plugin-b9647e5a9bd8 (latest)
    No modifications to downloaded plugin and scripts.

    Any help would be greatly appreciated!

    Thanks,
    FF
     
    Last edited: Dec 7, 2018
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    408
    Do you have a callstack for the crash?
     
  3. efge

    efge

    Joined:
    Dec 13, 2007
    Posts:
    55
    2018-12-07 16:26:15.648517+0100 arkitscene[976:220494] -[ARImageAnchor isTracked]: unrecognized selector sent to instance 0x1c03418c0
    2018-12-07 16:26:15.671315+0100 arkitscene[976:220494] Uncaught exception: NSInvalidArgumentException: -[ARImageAnchor isTracked]: unrecognized selector sent to instance 0x1c03418c0
    (
    0 CoreFoundation 0x0000000182dbeda4 <redacted> + 252
    1 libobjc.A.dylib 0x0000000181f785ec objc_exception_throw + 56
    2 CoreFoundation 0x0000000182dcc098 <redacted> + 0
    3 CoreFoundation 0x0000000182dc45c8 <redacted> + 1380
    4 CoreFoundation 0x0000000182caa41c _CF_forwarding_prep_0 + 92
    5 arkitscene 0x0000000102d3f188 _Z42UnityARImageAnchorDataFromARImageAnchorPtrR22UnityARImageAnchorDataP13ARImageAnchor + 344
    6 arkitscene 0x0000000102d3efdc -[UnityARImageAnchorCallbackWrapper sendAnchorAddedEvent:] + 44
    7 arkitscene 0x0000000102d403f0 -[UnityARSession sendAnchorAddedEventToUnity:] + 256
    8 arkitscene 0x0000000102d402a8 -[UnityARSession session:didAddAnchors:] + 24
    9 ARKit 0x000000019e71b5d8 <redacted> + 132
    10 libdispatch.dylib 0x00000001826b0aa0 <redacted> + 24
    11 libdispatch.dylib 0x00000001826b0a60 <redacted> + 16
    12 libdispatch.dylib 0x00000001826bd65c <redacted> + 1012
    13 CoreFoundation 0x0000000182d67070 <redacted> + 12
    14 CoreFoundation 0x0000000182d64bc8 <redacted> + 2272
    15 CoreFoundation 0x0000000182c84da8 CFRunLoopRunSpecific + 552
    16 GraphicsServices 0x0000000184c6a020 GSEventRunModal + 100
    17 UIKit 0x000000018cca4758 UIApplicationMain + 236
    18 arkitscene 0x0000000102c983f0 main + 160
    19 libdyld.dylib 0x0000000182715fc0 <redacted> + 4
    )
    2018-12-07 16:26:15.674151+0100 arkitscene[976:220494] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ARImageAnchor isTracked]: unrecognized selector sent to instance 0x1c03418c0'
    *** First throw call stack:
    (0x182dbed8c 0x181f785ec 0x182dcc098 0x182dc45c8 0x182caa41c 0x102d3f188 0x102d3efdc 0x102d403f0 0x102d402a8 0x19e71b5d8 0x1826b0aa0 0x1826b0a60 0x1826bd65c 0x182d67070 0x182d64bc8 0x182c84da8 0x184c6a020 0x18cca4758 0x102c983f0 0x182715fc0)
    libc++abi.dylib: terminating with uncaught exception of type NSException

    By the way, everything works on later devices (tested on iPhone 7 + 8 and iPad Pro 10.5).
     
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    408
    Sounds like the plugin is trying to use an unsupported API. We may be missing some checks for that in the plugin -- are you trying to use image tracking?

    Edit: Nevermind, that's how this thread started :) I'll investigate and get back to you.
     
    Last edited: Dec 8, 2018
    efge likes this.
  5. immergity

    immergity

    Joined:
    Apr 20, 2017
    Posts:
    4
    Hi tdmowrer,
    Can you suggest some quick workaround for this issue? We need to show after tomorrow using ARKit image recognition to the client. But image tracking is not working with this issue.
    iPhone 7.
     
    Last edited: Dec 18, 2018
  6. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    408
    We are not aware of any issue. The original report in this thread was specific to iPhone 6s, which we were not able to reproduce. Looks like you are on iPhone 7, which @efge said worked for them. Are you using the latest Xcode and is your device on iOS 12?
     
  7. immergity

    immergity

    Joined:
    Apr 20, 2017
    Posts:
    4
    I tried to run on 2 phones with OS version 11.3 and 11.4. Everywhere the application crashes. After I upgraded to iOS 12, the bug disappeared, but ARKit behaves like this video:

    The object each frame appears and disappears and spins. How does this fix this problem?
     
  8. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    6
    @tdmowrer Is there an update on this? image tracking is not working on the s6. The camera stalls out/freezes when it recognizes an image. It works fine on the iphone7

    ios 12.1.3
    unity 18.3.4
    Thanks.
     
  9. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    34
    Seeing the exact same issue on 2018.3.7 currently. Both the sample scenes and my own are experiencing this.

    EDIT: Just tried again with a completely clean project on 2018.3.7. Used nothing but the ARKit zip file from bitbucket and got the same error.

    EDIT2: "Solved" it by pulling down the v2.0.0 tagged version on Bitbucket instead of the tip (latest) It appears as though it's broken in the main repo but not in the 2.0 tag
     
    Last edited: Mar 8, 2019