【问题标题】:SIGSEGV with Unity and ARFoundationSIGSEGV 与 Unity 和 ARFoundation
【发布时间】:2023-04-07 17:22:01
【问题描述】:

我尝试使用 Unity 为 Android 构建一个最小的 AR 示例。我刚刚添加了一个默认的ARSession 和ARSession Origin 组件,以及一个普通的立方体。为 Android 构建时,应用启动,请求摄像头权限,然后因段错误而崩溃

E AndroidRuntime: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x730071
E AndroidRuntime:     r0  00650070  r1  00730069  r2  00000000  r3  ba086bed
E AndroidRuntime:     r4  c5434b18  r5  c5585700  r6  c5434b18  r7  00000000
E AndroidRuntime:     r8  ba800230  r9  80808080  r10 00000000  r11 00000000
E AndroidRuntime:     ip  ba809890  sp  c770df00  lr  ba7caca7  pc  ba086bf6
E AndroidRuntime:
E AndroidRuntime: backtrace:
E AndroidRuntime:       #00 pc 01144bf6  /data/app/com.google.ar.core-0FwyTEogZovhL9iDNFManA==/lib/arm/libarcore_c.so (ArConfig_setUpdateMode+10) (BuildId: b7db86ce26fc040cd3b3e52884b3958c)
E AndroidRuntime:       #01 pc 00009ca3  /data/app/com.DefaultCompany.ARTest-0beAqntVrT4ykTPCNeastQ==/lib/arm/libarpresto_api.so (BuildId: 77fb2e26a7c07c77d26316725b88dd68)
E AndroidRuntime:       #02 pc 00008921  /data/app/com.DefaultCompany.ARTest-0beAqntVrT4ykTPCNeastQ==/lib/arm/libarpresto_api.so (BuildId: 77fb2e26a7c07c77d26316725b88dd68)
E AndroidRuntime:       #03 pc 000086d3  /data/app/com.DefaultCompany.ARTest-0beAqntVrT4ykTPCNeastQ==/lib/arm/libarpresto_api.so (BuildId: 77fb2e26a7c07c77d26316725b88dd68)
E AndroidRuntime:       #04 pc 00007601  /data/app/com.DefaultCompany.ARTest-0beAqntVrT4ykTPCNeastQ==/lib/arm/libarpresto_api.so (ArPresto_update+20) (BuildId: 77fb2e26a7c07c77d26316725b88dd68)
E AndroidRuntime:       #05 pc 000235e4  /data/app/com.DefaultCompany.ARTest-0beAqntVrT4ykTPCNeastQ==/lib/arm/libUnityARCore.so (UnityARCore_session_update+352) (BuildId: 0df5e245f68665ac5a8a3e95b27441e98581e0ba)
E AndroidRuntime:       #06 pc 0000d32a  <anonymous:e32f3000>
E AndroidRuntime:
E AndroidRuntime: managed backtrace:
E AndroidRuntime:       #00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)
E AndroidRuntime:       #01 UnityEngine.XR.ARCore.ARCoreSessionSubsystem/Provider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <localpathARTest/Library/PackageCache/com.unity.xr.arcore@2.1.2/Runtime/ARCoreSessionSubsystem.cs:52>
E AndroidRuntime:       #02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <localpathARTest/Library/PackageCache/com.unity.xr.arsubsystems@2.1.1/Runtime/SessionSubsystem/XRSessionSubsystem.cs:131>
E AndroidRuntime:       #03 UnityEngine.XR.ARFoundation.ARSession:Update () <localpathARTest/Library/PackageCache/com.unity.xr.arfoundation@2.1.4/Runtime/AR/ARSession.cs:349>
E AndroidRuntime:       #04 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
E AndroidRuntime:
E AndroidRuntime:   at libarcore_c.ArConfig_setUpdateMode(ArConfig_setUpdateMode:10)
E AndroidRuntime:   at libarpresto_api.0x9ca3(Native Method)
E AndroidRuntime:   at libarpresto_api.0x8921(Native Method)
E AndroidRuntime:   at libarpresto_api.0x86d3(Native Method)
E AndroidRuntime:   at libarpresto_api.ArPresto_update(ArPresto_update:20)
E AndroidRuntime:   at libUnityARCore.UnityARCore_session_update(UnityARCore_session_update:352)
E AndroidRuntime:   at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)(Native Method)
E AndroidRuntime:   at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.Provider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(localpathARTest/Library/PackageCache/com.unity.xr.arcore@2.1.2/Runtime/ARCoreSessionSubsystem.cs:52)
E AndroidRuntime:   at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(localpathARTest/Library/PackageCache/com.unity.xr.arsubsystems@2.1.1/Runtime/SessionSubsystem/XRSessionSubsystem.cs:131)
E AndroidRuntime:   at UnityEngine.XR.ARFoundation.ARSession.Update ()(localpathARTest/Library/PackageCache/com.unity.xr.arfoundation@2.1.4/Runtime/AR/ARSession.cs:349)
E AndroidRuntime:   at System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr)(Native Method)

这发生在 Mono 和 IL2CPP 构建中。我使用的是华为智能手机,因此我不得不使用 apk 安装 Google AR 服务,因为它在 Play 商店中被屏蔽了。

还有其他人遇到过这个问题吗?

【问题讨论】:

  • 你有没有想过这个问题?我也有同样的问题????
  • 很遗憾没有。仍然希望得到答案

标签: unity3d arcore


【解决方案1】:

我正在使用 Xperia 1 II 并且遇到了同样的问题。我试过Step 2 of this codelab,但在权限检查后崩溃了。

将Target Architectures 更改为ARM64 解决了它。

  • 团结 2021.2.5f1
  • AR 基础 4.2.1
  • ARCore XR 插件 4.2.1

【讨论】:

    猜你喜欢
    • 2022-09-29
    • 1970-01-01
    • 2019-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多