1

我正在使用 Google Tango 开发应用程序。有一段时间一切正常,但昨天在重构了一些变量并恢复了一些更改后,它突然崩溃了。启动应用程序时,我收到以下错误日志:

A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.os.IBinder.getInterfaceDescriptor()' on a null object reference
A/art: art/runtime/java_vm_ext.cc:410]   at void com.google.atap.tangoservice.TangoPointCloudData.readFromParcel(android.os.Parcel) (TangoPointCloudData.java:154)
A/art: art/runtime/java_vm_ext.cc:410]   at void com.google.atap.tangoservice.TangoPointCloudData.<init>(android.os.Parcel) (TangoPointCloudData.java:109)
A/art: art/runtime/java_vm_ext.cc:410] 
A/art: art/runtime/java_vm_ext.cc:410]     in call to CallVoidMethodV
A/art: art/runtime/java_vm_ext.cc:410] "Binder_2" prio=5 tid=9 Runnable
A/art: art/runtime/java_vm_ext.cc:410]   | group="main" sCount=0 dsCount=0 obj=0x12cfa0a0 self=0x5594118c60
A/art: art/runtime/java_vm_ext.cc:410]   | sysTid=26922 nice=0 cgrp=default sched=0/0 handle=0x7fa30ed450
A/art: art/runtime/java_vm_ext.cc:410]   | state=R schedstat=( 23739007 23622981 186 ) utm=0 stm=2 core=3 HZ=100
A/art: art/runtime/java_vm_ext.cc:410]   | stack=0x7fa2ff1000-0x7fa2ff3000 stackSize=1013KB
A/art: art/runtime/java_vm_ext.cc:410]   | held mutexes= "mutator lock"(shared held)
A/art: art/runtime/java_vm_ext.cc:410]   (no managed stack frames)
A/art: art/runtime/java_vm_ext.cc:410] 
A/art: art/runtime/runtime.cc:366] Runtime aborting...
A/art: art/runtime/runtime.cc:366] Aborting thread:
A/art: art/runtime/runtime.cc:366] "Binder_2" prio=5 tid=9 Native
A/art: art/runtime/runtime.cc:366]   | group="" sCount=0 dsCount=0 obj=0x12cfa0a0 self=0x5594118c60
A/art: art/runtime/runtime.cc:366]   | sysTid=26922 nice=0 cgrp=default sched=0/0 handle=0x7fa30ed450
A/art: art/runtime/runtime.cc:366]   | state=R schedstat=( 42129216 29262460 216 ) utm=2 stm=2 core=5 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa2ff1000-0x7fa2ff3000 stackSize=1013KB
A/art: art/runtime/runtime.cc:366]   | held mutexes= "abort lock"
A/art: art/runtime/runtime.cc:366]   (no managed stack frames)
A/art: art/runtime/runtime.cc:366] Pending exception java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.os.IBinder.getInterfaceDescriptor()' on a null object reference
A/art: art/runtime/runtime.cc:366]   at void com.google.atap.tangoservice.TangoPointCloudData.readFromParcel(android.os.Parcel) (TangoPointCloudData.java:154)
A/art: art/runtime/runtime.cc:366]   at void com.google.atap.tangoservice.TangoPointCloudData.<init>(android.os.Parcel) (TangoPointCloudData.java:109)
A/art: art/runtime/runtime.cc:366] Dumping all threads without appropriate locks held: thread list lock mutator lock
A/art: art/runtime/runtime.cc:366] All threads:
A/art: art/runtime/runtime.cc:366] DALVIK THREADS (17):
A/art: art/runtime/runtime.cc:366] "Binder_2" prio=5 tid=9 Runnable
A/art: art/runtime/runtime.cc:366]   | group="" sCount=0 dsCount=0 obj=0x12cfa0a0 self=0x5594118c60
A/art: art/runtime/runtime.cc:366]   | sysTid=26922 nice=0 cgrp=default sched=0/0 handle=0x7fa30ed450
A/art: art/runtime/runtime.cc:366]   | state=R schedstat=( 51036091 29262460 221 ) utm=3 stm=2 core=5 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa2ff1000-0x7fa2ff3000 stackSize=1013KB
A/art: art/runtime/runtime.cc:366]   | held mutexes= "abort lock" "mutator lock"(shared held)
A/art: art/runtime/runtime.cc:366]   (no managed stack frames)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "main" prio=5 tid=1 Native
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x73ef86e8 self=0x5593e6de30
A/art: art/runtime/runtime.cc:366]   | sysTid=26910 nice=0 cgrp=default sched=0/0 handle=0x7fa7c1efc8
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 957520220 146169897 1107 ) utm=74 stm=21 core=2 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fef65d000-0x7fef65f000 stackSize=8MB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   at android.os.MessageQueue.nativePollOnce(Native method)
A/art: art/runtime/runtime.cc:366]   at android.os.MessageQueue.next(MessageQueue.java:323)
A/art: art/runtime/runtime.cc:366]   at android.os.Looper.loop(Looper.java:135)
A/art: art/runtime/runtime.cc:366]   at android.app.ActivityThread.main(ActivityThread.java:5418)
A/art: art/runtime/runtime.cc:366]   at java.lang.reflect.Method.invoke!(Native method)
A/art: art/runtime/runtime.cc:366]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
A/art: art/runtime/runtime.cc:366]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "Signal Catcher" prio=5 tid=2 WaitingInMainSignalCatcherLoop
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12cec0a0 self=0x55941009b0
A/art: art/runtime/runtime.cc:366]   | sysTid=26915 nice=0 cgrp=default sched=0/0 handle=0x7fa3a2d450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 653333 0 1 ) utm=0 stm=0 core=4 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa3931000-0x7fa3933000 stackSize=1013KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: do_sigtimedwait+0xd8/0x1ac
A/art: art/runtime/runtime.cc:366]   kernel: SyS_rt_sigtimedwait+0xac/0xec
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   (no managed stack frames)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "JDWP" prio=5 tid=3 WaitingInMainDebuggerLoop
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12cef0a0 self=0x55940f04e0
A/art: art/runtime/runtime.cc:366]   | sysTid=26916 nice=0 cgrp=default sched=0/0 handle=0x7fa3927450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 15460212 647917 28 ) utm=0 stm=1 core=2 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa382b000-0x7fa382d000 stackSize=1013KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: poll_schedule_timeout+0x54/0xb8
A/art: art/runtime/runtime.cc:366]   kernel: do_select+0x414/0x468
A/art: art/runtime/runtime.cc:366]   kernel: core_sys_select+0x1e0/0x2e0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_pselect6+0x15c/0x1f0
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   (no managed stack frames)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "ReferenceQueueDaemon" prio=5 tid=4 Waiting
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12ce8c40 self=0x55940f30f0
A/art: art/runtime/runtime.cc:366]   | sysTid=26917 nice=0 cgrp=default sched=0/0 handle=0x7fa381f450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 607968 21093 12 ) utm=0 stm=0 core=4 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa371d000-0x7fa371f000 stackSize=1037KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   at java.lang.Object.wait!(Native method)
A/art: art/runtime/runtime.cc:366]   - waiting on <0x0f1a6280> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:147)
A/art: art/runtime/runtime.cc:366]   - locked <0x0f1a6280> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.run(Thread.java:818)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "FinalizerDaemon" prio=5 tid=5 Waiting
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12ce8ca0 self=0x55940fb030
A/art: art/runtime/runtime.cc:366]   | sysTid=26918 nice=0 cgrp=default sched=0/0 handle=0x7fa3713450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 1231977 91667 11 ) utm=0 stm=0 core=5 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa3611000-0x7fa3613000 stackSize=1037KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   at java.lang.Object.wait!(Native method)
A/art: art/runtime/runtime.cc:366]   - waiting on <0x073f20b9> (a java.lang.ref.ReferenceQueue)
A/art: art/runtime/runtime.cc:366]   at java.lang.Object.wait(Object.java:423)
A/art: art/runtime/runtime.cc:366]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101)
A/art: art/runtime/runtime.cc:366]   - locked <0x073f20b9> (a java.lang.ref.ReferenceQueue)
A/art: art/runtime/runtime.cc:366]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:185)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.run(Thread.java:818)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "FinalizerWatchdogDaemon" prio=5 tid=6 Sleeping
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12ce8d00 self=0x5593f9e6a0
A/art: art/runtime/runtime.cc:366]   | sysTid=26919 nice=0 cgrp=default sched=0/0 handle=0x7fa3607450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 416302 0 6 ) utm=0 stm=0 core=0 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa3505000-0x7fa3507000 stackSize=1037KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.sleep!(Native method)
A/art: art/runtime/runtime.cc:366]   - sleeping on <0x09ef7cfe> (a java.lang.Object)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.sleep(Thread.java:1031)
A/art: art/runtime/runtime.cc:366]   - locked <0x09ef7cfe> (a java.lang.Object)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.sleep(Thread.java:985)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:273)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:284)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:232)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.run(Thread.java:818)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "HeapTaskDaemon" prio=5 tid=7 Native
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12ce8d60 self=0x5593e8d5f0
A/art: art/runtime/runtime.cc:366]   | sysTid=26920 nice=0 cgrp=default sched=0/0 handle=0x7fa34fb450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 25782812 1505781 106 ) utm=2 stm=0 core=2 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa33f9000-0x7fa33fb000 stackSize=1037KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/art: art/runtime/runtime.cc:366]   at dalvik.system.VMRuntime.runHeapTasks(Native method)
A/art: art/runtime/runtime.cc:366]   at java.lang.Daemons$HeapTaskDaemon.run(Daemons.java:355)
A/art: art/runtime/runtime.cc:366]   at java.lang.Thread.run(Thread.java:818)
A/art: art/runtime/runtime.cc:366] 
A/art: art/runtime/runtime.cc:366] "Binder_1" prio=5 tid=8 Native
A/art: art/runtime/runtime.cc:366]   | group="" sCount=1 dsCount=0 obj=0x12cf70a0 self=0x5593faa340
A/art: art/runtime/runtime.cc:366]   | sysTid=26921 nice=0 cgrp=default sched=0/0 handle=0x7fa31f3450
A/art: art/runtime/runtime.cc:366]   | state=S schedstat=( 19983811 29755159 199 ) utm=1 stm=0 core=3 HZ=100
A/art: art/runtime/runtime.cc:366]   | stack=0x7fa30f7000-0x7fa30f9000 stackSize=1013KB
A/art: art/runtime/runtime.cc:366]   | held mutexes=
A/art: art/runtime/runtime.cc:366]   kernel: __switch_to+0x70/0x7c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait_queue_me+0xd4/0x12c
A/art: art/runtime/runtime.cc:366]   kernel: futex_wait+0xdc/0x1e4
A/art: art/runtime/runtime.cc:366]   kernel: do_futex+0xc8/0x8d0
A/art: art/runtime/runtime.cc:366]   kernel: SyS_futex+0xf8/0x174
A/art: art/runtime/runtime.cc:366]   kernel: cpu_switch_to+0x48/0x4c
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 26922 (Binder_2)

我将原因缩小到这一行:

mTango.connectListener(framePairs, new Tango.OnTangoUpdateListener() {...});

但由于错误没有提到我的代码的任何部分,我不知道在哪里进一步寻找。

我在解决这个问题后的发现:

  • 侦听器是否包含代码并不重要。
  • 该错误仅在相机获取图片后发生。因此,只要设备放在桌子上以便相机被挡住,应用程序在技术上就可以正常运行。
  • 尽管该应用程序以前可以正常工作,但更早的提交现在都被破坏了。
  • 谷歌的基本示例仍然可以正常工作。
  • 使用不同版本的 Tango 或 Android 不会改变任何东西。
  • 清理 gradle 或进行全新安装不会改变任何事情。
  • 我在 Stackoverflow 上的另一个线程中发现原因可能出在库的代码中,但因为它在我不知道这怎么可能之前曾经工作过。

有谁知道如何解决这个问题?

4

1 回答 1

0

你有没有改变过探戈核心?我昨天在我的Phab2上更新Tango Core时遇到了这个问题。我想你应该尝试最新发布的SDK“Eisa”来解决这个问题。

于 2017-02-16T07:17:46.787 回答