Using ARHitTestResultType.ExistingPlaneUsingGeometry leads to crash

  • Issue category: Real-time Mapping; HitTesting
  • Device type & OS version: Android 13 on a Pixel 4
  • Host machine & OS version: Windows 11, 22H2
  • Issue Environment : On Device
  • ARDK version: 2.2.0
  • Unity version: 2021.3.4f1

Bug reproduction steps

Previously I was only using ARHitTestResultType.EstimatedHorizontalPlane (4) when hit-testing and changed the mask to also use ExistingPlaneUsingGeometry (68). That’s when I started seeing multiple crashes on the described platform. In the backtrace I saw two interesting method names, that might point to the problem underneath:

  • ArPlane_isPoseInPolygon
  • _NARFrame_HitTestAgainstTypes

When I was testing this I had my phone pointed at some real-world geometry, that was causing a part of the found planes to be (properly) occluded. So my thoughts where if that has something to do with concave plane geometry maybe? - just guessing though :wink:

Anyway, for now I could work around it by using EstimatedHorizontalPlane + ExistingPlaneUsingExtent (36) instead, but I’m curious what the issue behind this behavior was.

Best regards, Felix


Here is the full backtrace I captured in logcat (if that helps):

Error AndroidRuntime FATAL EXCEPTION: UnityMain
Error AndroidRuntime Process: <redacted>, PID: 31108
Error AndroidRuntime java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Error AndroidRuntime Version '2021.3.4f1 (cb45f9cae8b7)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Error AndroidRuntime Build fingerprint: 'google/flame/flame:13/TP1A.220905.004/8927612:user/release-keys'
Error AndroidRuntime Revision: 'MP1.0'
Error AndroidRuntime ABI: 'arm64'
Error AndroidRuntime Timestamp: 2022-10-04 18:05:17+0200
Error AndroidRuntime pid: 31108, tid: 31136, name: UnityMain  >>> <redacted> <<<
Error AndroidRuntime uid: 1010797
Error AndroidRuntime signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3f7ffff8
Error AndroidRuntime     x0  0000000000000000  x1  000000000fe00000  x2  0000007a7a1fa7e0  x3  0000007a7a1fa900
Error AndroidRuntime     x4  0000007902585974  x5  b400007b14c237f0  x6  b400007b24be0650  x7  0000007901a33f5d
Error AndroidRuntime     x8  000000003f800000  x9  0000000000000000  x10 00000000000003ff  x11 b400007c84adfbb8
Error AndroidRuntime     x12 0000000000000130  x13 0000000000000080  x14 0000000000000130  x15 000000000000004b
Error AndroidRuntime     x16 0000000000000001  x17 0000007d94a5eebc  x18 0000000000000000  x19 000000000fe00000
Error AndroidRuntime     x20 b400007b94b332b0  x21 b400007b94b332b0  x22 b400007b44b0c990  x23 0000000000000000
Error AndroidRuntime     x24 0000000000000000  x25 0000007a7a1fc000  x26 0000000000000001  x27 0000007a7a1fb5d0
Error AndroidRuntime     x28 0000007a7a1fb4d0  x29 0000007a7a1fa9a0
Error AndroidRuntime     sp  0000007a7a1fa6f0  lr  0000007902591a30  pc  0000007902591a68
Error AndroidRuntime 
Error AndroidRuntime backtrace:
Error AndroidRuntime       #00 pc 0000000001133a68  /data/app/~~OqSARM8rXwOwFu7hTJlU7Q==/com.google.ar.core-oPyemGeBahDTz096xx_jfg==/base.apk (BuildId: efdecfcbde95e1cf28f761712dd43e57)
Error AndroidRuntime       #01 pc 0000000001133a2c  /data/app/~~OqSARM8rXwOwFu7hTJlU7Q==/com.google.ar.core-oPyemGeBahDTz096xx_jfg==/base.apk (BuildId: efdecfcbde95e1cf28f761712dd43e57)
Error AndroidRuntime       #02 pc 0000000001127a14  /data/app/~~OqSARM8rXwOwFu7hTJlU7Q==/com.google.ar.core-oPyemGeBahDTz096xx_jfg==/base.apk (ArPlane_isPoseInPolygon+160) (BuildId: efdecfcbde95e1cf28f761712dd43e57)
Error AndroidRuntime       #03 pc 000000000028769c  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libardk_client_platform.so (BuildId: b726770425018cf38110004df47b92838a07ccba)
Error AndroidRuntime       #04 pc 00000000002aa548  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libardk_client_platform.so (BuildId: b726770425018cf38110004df47b92838a07ccba)
Error AndroidRuntime       #05 pc 00000000002b8c9c  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libardk_client_platform.so (_NARFrame_HitTestAgainstTypes+124) (BuildId: b726770425018cf38110004df47b92838a07ccba)
Error AndroidRuntime       #06 pc 0000000000bcfd20  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #07 pc 0000000000bcfab8  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #08 pc 0000000000bebd38  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #09 pc 0000000000bef420  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #10 pc 0000000000becadc  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #11 pc 00000000009ebd70  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #12 pc 00000000009ebbd0  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libil2cpp.so (BuildId: 76beacc8192bdc9d73efb463bb878b23c3d4b8af)
Error AndroidRuntime       #13 pc 00000000002f0e34  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #14 pc 00000000002fec74  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #15 pc 000000000030ca8c  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #16 pc 000000000017cd4c  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #17 pc 0000000000231c74  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #18 pc 0000000000231cb4  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #19 pc 0000000000231eec  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #20 pc 000000000037ab5c  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #21 pc 0000000000391460  /data/app/~~H6PsdJ_kkMUSWq2XrpUJNw==/<redacted>-5l3qdIgTVaf0cMWPDi95ZA==/lib/arm64/libunity.so (BuildId: d025680dd6e02e0578991a671b9459a06d41ee71)
Error AndroidRuntime       #22 pc 0000000000440554  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 56e704c544e6c624201be2ab4933e853)
Error AndroidRuntime       #23 pc 000000000020a2b0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 56e704c544e6c624201be2ab4933e853)
Error AndroidRuntime       #24 pc 0000000000209334  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 56e704c544e6c624201be2ab4933e853)
Error AndroidRuntime       #25 pc 0000000000a178f4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat

Hi Felix, thanks for bringing this to our attention. Awesome work on finding a workaround. We have a new release, ARDK 2.3, coming in a few days. Let’s try it after the new release to see if the issue still occurs.

1 Like

Hi Felix,

I’m following up regarding this issue. Now that ARDK 2.3 is out, have you had a chance to upgrade and verify if the error is still present?