简体   繁体   English

调用getPoseAtTime()时Project Tango本机代码崩溃

[英]Project Tango native code crash when calling getPoseAtTime()

What I am trying to do is basically getting the position of the device, much like the motion tracking example. 我想要做的基本上是获取设备的位置,就像运动跟踪示例一样。 I read both the exmaple on Tango's website, and the example Java code. 我同时阅读了Tango网站上的摘录和示例Java代码。 I tried both Mira and Okul version of the SDK, but the crash happens all the time. 我尝试了SDK的Mira版本和Okul版本,但是崩溃总是发生。 Unsure about which step I did is wrong. 不确定我执行了哪一步是错误的。

Full logcat output is post on github gist . 完整的logcat输出发布在github gist上 For a shorter version: 对于较短的版本:

A/art: art/runtime/check_jni.cc:64] JNI DETECTED ERROR IN APPLICATION: jfieldID was NULL
A/art: art/runtime/check_jni.cc:64]     in call to SetDoubleField
A/art: art/runtime/check_jni.cc:64]     from int com.google.atap.tango.TangoJNINative.GetPoseAtTime(double, int, int, com.google.atap.tangoservice.TangoPoseData)
A/art: art/runtime/check_jni.cc:64] "LTSensorActivity" prio=5 tid=14 Runnable
A/art: art/runtime/check_jni.cc:64]   | group="main" sCount=0 dsCount=0 obj=0x64929dc8 self=0x4b160d68
A/art: art/runtime/check_jni.cc:64]   | sysTid=14960 nice=0 cgrp=apps sched=0/0 handle=0x43f05ec8
A/art: art/runtime/check_jni.cc:64]   | state=R schedstat=( 2661834 1966000 13 ) utm=0 stm=0 core=3 HZ=100
A/art: art/runtime/check_jni.cc:64]   | stack=0x4b48e000-0x4b492000 stackSize=1040KB
A/art: art/runtime/check_jni.cc:64]   native: art::Thread::DumpStack(std::ostream&) const+87 [0x4165db78] (libart.so)
A/art: art/runtime/check_jni.cc:64]   native: ??? [0x415098a6] (libart.so)
A/art: art/runtime/check_jni.cc:64]   native: art::JniAbortF(char const*, char const*, ...)+51 [0x4150a254] (libart.so)
A/art: art/runtime/check_jni.cc:64]   native: ??? [0x4150d036] (libart.so)
A/art: art/runtime/check_jni.cc:64]   native: ??? [0x41510336] (libart.so)
A/art: art/runtime/check_jni.cc:64]   native: Java_com_google_atap_tango_TangoJNINative_GetPoseAtTime__DIILcom_google_atap_tangoservice_TangoPoseData_2+57 [0x4b789dfe] (libtango_client_api.so)
A/art: art/runtime/check_jni.cc:64]   at com.google.atap.tango.TangoJNINative.GetPoseAtTime(Native method)
A/art: art/runtime/check_jni.cc:64]   at com.google.atap.tangoservice.Tango.getPoseAtTime(Tango.java:582)
A/art: art/runtime/check_jni.cc:64]   at info.dword1511.aoasensor.MappingActivity.getLocation(MappingActivity.java:259)
A/art: art/runtime/check_jni.cc:64]   at info.dword1511.aoasensor.MappingActivity.access$000(MappingActivity.java:30)
A/art: art/runtime/check_jni.cc:64]   at info.dword1511.aoasensor.MappingActivity$1.run(MappingActivity.java:48)
A/art: art/runtime/check_jni.cc:64]   at android.os.Handler.handleCallback(Handler.java:733)
A/art: art/runtime/check_jni.cc:64]   at android.os.Handler.dispatchMessage(Handler.java:95)
A/art: art/runtime/check_jni.cc:64]   at android.os.Looper.loop(Looper.java:136)
A/art: art/runtime/check_jni.cc:64]   at android.os.HandlerThread.run(HandlerThread.java:61)
A/art: art/runtime/check_jni.cc:64] 
A/art: art/runtime/runtime.cc:203] Runtime aborting...
...
A/libc: Fatal signal 6 (SIGABRT) at 0x000039b7 (code=-6), thread 14960 (LTSensorAct)

Minial code that reproduces the error is post on github gist . 产生错误的最小代码发布在github gist上

Could it be the poller is polling the data before Tango is connected? 连接Tango之前是轮询poller在轮询数据吗? You can only query the data after this call is finished, also note that it's in a runnable, so your polling function can potentially run before the connection line is executed. 您只能在调用完成之后查询数据,还要注意,这些数据处于可运行状态,因此您的轮询功能可以在执行连接线之前运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM