Tango应用程序突然中断JNI DETECTED ERROR IN APPLICATION

时间:2017-02-15 12:20:24

标签: java android java-native-interface tango

我正在使用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() {...});

但是由于错误没有提及我的代码的任何部分,我不知道在哪里可以看得更远。

我在研究问题后到目前为止的调查结果:

  • 监听器是否包含代码无关紧要。
  • 错误仅在相机拍照后发生。因此,只要设备位于桌面上以便相机被阻挡,那么应用程序在技术上运行良好。
  • 即使之前的应用程序曾经工作过,现在甚至早期的提交都已破坏。
  • Google的基本示例仍可正常使用。
  • 使用不同版本的Tango或Android不会改变任何内容。
  • 清理gradle或进行全新安装不会改变任何内容。
  • 我在Stackoverflow的另一个线程中发现原因可能在于库的代码,但是因为它之前没有看到它是如何工作的。

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

1 个答案:

答案 0 :(得分:0)

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