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. I tried both Mira and Okul version of the SDK, but the crash happens all the time. Unsure about which step I did is wrong.
Full logcat output is post on 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 .
Could it be the poller
is polling the data before Tango is connected? 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.