aafdex-sdk unity3d在场景转换时崩溃-仅在Android上 [英] aafdex-sdk unity3d crash on scene transition - only on Android
问题描述
我一直在使用Affectiva的Unity 5.4的affdex-sdk(v2.2)开发用于情感识别的应用程序.我的应用程序包含3个场景,然后我使用fectiva的Camera_Detector
场景,并使用一种情感作为触发条件转到下一个场景.
I've been developing an application for emotion recognition using Affectiva's affdex-sdk (v2.2) for Unity 5.4. My application consists of 3 scenes, then I use affectiva's Camera_Detector
scene, and use an emotion as trigger to go to the next scene.
它可以在UnityEditor中完美运行,并且可以作为Windows编译包(x86)运行.但是,当我将其部署到Android(5.0)时,从Camera_Detector
场景跳到下一个场景时,崩溃总是在运行时发生(Camera_Detector
之前的场景加载,Camera_Detector
中的场景加载永远不会崩溃).
It runs perfectly in UnityEditor and as a Windows compiled package (x86). However when I deploy it to Android (5.0), crashes occur always at runtime when skipping from Camera_Detector
scene to the next scene (scene loads previous to Camera_Detector
and in Camera_Detector
itself never crash).
我正在使用(在C#中)
I'm using (in C#)
SceneManager.LoadScene("nextscene");
Android设备仅显示不幸的是,affdex_emotapp"已停止.
The Android device simply displays "Unfortunately, affdex_emotapp" has stopped.
有没有机会让它在Android下运行?
Is there any chance to get this to work under Android?
这是logcat的崩溃输出:
Here is the crash output from logcat:
F/libc (15037): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x898f0308 in tid 15053 (UnityMain)
I/DEBUG ( 247): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 247): Build fingerprint: samsung/matissevewifixx/matissevewifi:5.1.1/LMY47X/T533XXU1BOI3:user/release-keys'
I/DEBUG ( 247): Revision: '2'
I/DEBUG ( 247): ABI: 'arm'
I/DEBUG ( 247): pid: 15037, tid: 15053, name: UnityMain >>> com.ibeb.emoface_cam <<<
I/DEBUG ( 247): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr x898f0308
I/DEBUG ( 247): r0 898f0308 r1 898f1000 r2 fffffe8c r3 898f1000
I/DEBUG ( 247): r4 898f0308 r5 00000001 r6 898f0ffc r7 b42c7000
I/DEBUG ( 247): r8 845d408c r9 b91d9718 sl 00000001 fp a2b4e1a4
I/DEBUG ( 247): ip a4110ee0 sp a2b4e178 lr a4031b34 pc a4031aa4 cpsr 80070010
I/DEBUG ( 247):
I/DEBUG ( 247): backtrace:
I/DEBUG ( 247): #00 pc 002b3aa4 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #01 pc 002b3b30 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so (GC_push_all_stack+72)
I/DEBUG ( 247): #02 pc 002bc7bc /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #03 pc 002bc88c /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #04 pc 002b85f8 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #05 pc 002b55ec /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #06 pc 002b1ee0 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #07 pc 002abfb4 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #08 pc 002aba98 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #09 pc 002ad144 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #10 pc 002b0b50 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #11 pc 002b1080 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #12 pc 002b12e8 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #13 pc 001f5a04 /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so
I/DEBUG ( 247): #14 pc 001f69fc /data/app/com.ibeb.emoface_cam-2/lib/arm/libmono.so (mono_array_new_specific+232)
I/DEBUG ( 247): #15 pc 0000280c <unknown>
推荐答案
这听起来与开发人员门户网站中涵盖的此问题有关:
This sounds related to this issue covered in the developer portal:
"切换场景时,您需要销毁并重新生成检测器和CameraInput.如果不重新生成这些组件,Unity的相机界面将在重新加载时获得冻结的图像,从而导致度量标准持续来自所拍摄的图像在现场过渡时." - http://developer.affectiva.com/v2_3/unity/analyze-camera/
"When you switch scenes, you need to destroy and respawn the Detector and CameraInput. If you do not respawn these components, Unity’s camera interface will get a frozen image at reload, thus causing the metrics to continually come from the image taken at the scene transition." - http://developer.affectiva.com/v2_3/unity/analyze-camera/
您要销毁并重新生成检测器和CameraInput吗?
Are you destroying and respawning the Detector and CameraInput.
这篇关于aafdex-sdk unity3d在场景转换时崩溃-仅在Android上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!