JNI错误(应用程序错误):本地参考表溢出(最大= 512),即使没有本机代码

时间:2016-02-11 20:46:36

标签: android

我们最近推出了我们的应用程序并实际升级了以前的版本..

突然间,我们开始在大量的设备中看到这个错误..我们没有发现什么事情,而且日志非常含糊......

在此处附加日志。但是,任何帮助或一些线索都可以帮助我们调试问题。

构建指纹:'Verizon / zeroltevzw / zeroltevzw:5.1.1 / LMY47X / G925VVRU4BOK7:user / release-keys'

修订版:'10'

ABI:'arm64'

pid:31610,tid:31610,name:st.mediamanager>>> <<<

信号6(SIGABRT),代码-6(SI_TKILL),故障添加器--------

中止消息:'sart / runtime / indirect_reference_table.cc:98] JNI错误(app bug):本地引用表溢出(max = 512)'

x0   0000000000000000  x1   0000000000007b7a  x2   0000000000000006  x3   0000007fa219fe30

x4   0000007fa219fe30  x5   0000000000000005  x6   0000000000000001  x7   0000000000000020

x8   0000000000000083  x9   00000000000000ca  x10  0000007fa1f2a000  x11  0000000000000001

x12  0000000000000001  x13  0000007fa1f2a000  x14  c4aa4c0daad90e20  x15  0000007f92002a31

x16  0000007fa1f2a610  x17  0000007fa1eca174  x18  0000000000000000  x19  0000007fa219fe30

x20  0000007fa21a00e8  x21  0000007fa1f30000  x22  0000000000000001  x23  0000000000000006

x24  0000007fee90e2d0  x25  0000007f9e0a6000  x26  0000007fee90e2c8  x27  0000007f9dffd520

x28  0000007f9e0a6000  x29  0000007fee90e150  x30  0000007fa1e8c264

sp   0000007fee90e150  pc   0000007fa1eca17c  pstate 0000000060000000

回溯:

#00 pc 000000000005e17c  /system/lib64/libc.so (tgkill+8)

#01 pc 0000000000020260  /system/lib64/libc.so (pthread_kill+160)

#02 pc 0000000000021794  /system/lib64/libc.so (raise+28)

#03 pc 000000000001b17c  /system/lib64/libc.so (abort+60)

#04 pc 0000000000310534  /system/lib64/libart.so (art::Runtime::Abort()+300)

#05 pc 00000000000d5378  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)

#06 pc 00000000001e7ff0  /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)

#07 pc 00000000002e28cc  /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)

#08 pc 000000000002a5dc  /system/framework/arm64/boot.oat

构建指纹:'Verizon / trltevzw / trltevzw:5.1.1 / LMY47X / N910VVRU2BPA1:user / release-keys' 修订版:'12' ABI:'手臂' pid:481,tid:481,name:st.mediamanager>>> <<< 信号6(SIGABRT),代码-6(SI_TKILL),故障地址-------- 中止消息:'sart / runtime / indirect_reference_table.cc:109] JNI错误(app bug):本地引用表溢出(max = 512)'     r0 00000000 r1 000001e1 r2 00000006 r3 00000000     r4 b6fc3e38 r5 00000006 r6 00000016 r7 0000010c     r8 00000000 r9 b486f550 sl b4827800 fp 00000475     ip 000001e1 sp bebbaaf8 lr b6e22715 pc b6e46854 cpsr 60070010

回溯:     #00 pc 00038854 /system/lib/libc.so(tgkill + 12)     #01 pc 00014711 /system/lib/libc.so(pthread_kill + 52)     #02 pc 0001532f /system/lib/libc.so( raise + 10)     #03 pc 00011bc9 /system/lib/libc.so(__libc_android_abort + 36)     #04 pc 0001003c /system/lib/libc.so(abort + 4)     #05 pc 00230cd1 /system/lib/libart.so(art :: Runtime :: Abort()+ 160)     #06 pc 000ac58b /system/lib/libart.so(art :: LogMessage :: ~LogMessage()+ 1322)     #07 pc 0016996d /system/lib/libart.so(art :: IndirectReferenceTable :: Add(unsigned int,art​​ :: mirror :: Object *)+ 244)     #08 pc 00214f43 /system/lib/libart.so(art :: VMClassLoader_findLoadedClass(_JNIEnv *,_ jclass *,_ jobject *,_ jstring *)+ 162)     #09 pc 0001bd8d /system/framework/arm/boot.oat

构建指纹:'Verizon / zenltevzw / zenltevzw:5.1.1 / LMY47X / G928VVRU2AOJ3:user / release-keys' 修订版:'9' ABI:'arm64' pid:18658,tid:18658,name:st.mediamanager>>> <<< 信号6(SIGABRT),代码-6(SI_TKILL),故障地址-------- 中止消息:'sart / runtime / indirect_reference_table.cc:109] JNI错误(app bug):本地引用表溢出(max = 512)'     x0 0000000000000000 x1 00000000000048e2 x2 0000000000000006 x3 0000007fa3887e30     x4 0000007fa3887e30 x5 0000000000000005 x6 0000000000000001 x7 0000000000000020     x8 0000000000000083 x9 000000000000005e x10 0000007fa3613000 x11 0000000000000001     x12 0000000000000001 x13 0000007fa3613000 x14 24d3f27831b256ef x15 0000000000000001     x16 0000007fa3613610 x17 0000007fa35b30d4 x18 0000000000000000 x19 0000007fa3887e30     x20 0000007fa38880e8 x21 0000007fa3619000 x22 0000000000000001 x23 0000000000000006     x24 0000007fc7e2cbc0 x25 0000007f9f820d40 x26 0000000000000001 x27 0000007f8c101b60     x28 0000000000000000 x29 0000007fc7e2ca40 x30 0000007fa3575224     sp 0000007fc7e2ca40 pc 0000007fa35b30dc pstate 0000000060000000

回溯:

#00 pc 000000000005e0dc  /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000020220  /system/lib64/libc.so (pthread_kill+160)
#02 pc 0000000000021754  /system/lib64/libc.so (raise+28)
#03 pc 000000000001b13c  /system/lib64/libc.so (abort+60)
#04 pc 00000000002ffca4  /system/lib64/libart.so (art::Runtime::Abort()+300)
#05 pc 00000000000d15b8  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#06 pc 00000000002ad730  /system/lib64/libart.so (art::Monitor::VisitLocks(art::StackVisitor*, void (*)(art::mirror::Object*, void*), void*, bool)+952

#07 pc 0000000000314978  /system/lib64/libart.so (art::StackDumpVisitor::VisitFrame()+568)
#08 pc 000000000030ba08  /system/lib64/libart.so (art::StackVisitor::WalkStack(bool)+308)
#09 pc 0000000000313754  /system/lib64/libart.so (art::Thread::DumpJavaStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+268)
#10 pc 0000000000313968  /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+272)
#11 pc 000000000031e8dc  /system/lib64/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+100)
#12 pc 00000000002ffd34  /system/lib64/libart.so (art::Runtime::Abort()+444)
#13 pc 00000000000d15b8  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#14 pc 00000000001d7468  /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)
#15 pc 00000000002d2018  /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)
#16 pc 000000000002a5dc  /system/framework/arm64/boot.oat

构建指纹:'Verizon / kltevzw / kltevzw:5.0 / LRX21T / G900VVRU2BOK3:user / release-keys'

修订版:'14'

ABI:'手臂'

pid:32148,tid:32148,name:st.mediamanager&gt;&gt;&gt; &LT;&LT;&LT;

信号6(SIGABRT),代码-6(SI_TKILL),故障添加器--------

中止消息:'art / runtime / indirect_reference_table.cc:113] JNI ERROR(app bug):本地参考表溢出(max = 512)'

r0 00000000  r1 00007d94  r2 00000006  r3 00000000

r4 b6f92114  r5 00000006  r6 00000016  r7 0000010c

r8 00000000  r9 b4e4f520  sl b4e07800  fp 000004ba

ip 00007d94  sp be8a3b38  lr b6f1bfd1  pc b6f40268  cpsr 60070010

回溯:

#00 pc 00038268  /system/lib/libc.so (tgkill+12)

#01 pc 00013fcd  /system/lib/libc.so (pthread_kill+52)

#02 pc 00014beb  /system/lib/libc.so (raise+10)

#03 pc 00011531  /system/lib/libc.so (__libc_android_abort+36)

#04 pc 0000fcbc  /system/lib/libc.so (abort+4)

#05 pc 0021d5d9  /system/lib/libart.so (art::Runtime::Abort()+160)

#06 pc 000a834b  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)

#07 pc 001574b7  /system/lib/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+346)

#08 pc 002010d5  /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+136)


#09 pc 0001b151  /system/framework/arm/boot.oat

1 个答案:

答案 0 :(得分:0)

我没有完整的答案,但评论过于冗长,所以我会将其发布为一个。

因此错误正是您所期望的 - 它调用本机代码会导致您使用本机共享超过512个对象。通常这是因为某处发生泄漏。而且您不需要直接使用本机代码来执行此操作 - 框架在幕后进行了大量本机调用。

从堆栈跟踪 - 我看到它的libart.so,而不是libdalvik.so。所以这种情况发生在从Dalvik VM转向Art的新设备上。堆栈跟踪看起来像是在尝试加载一个类并为某些JNI代码添加对它的引用,但我无法确定。我知道我们已经看到类加载在dalvik上不存在的Art上的类错误。

如果你有任何本机代码我会确保你正确地释放所有对java内存和类的引用。如果你不这样做 - 这可能是艺术中的一个错误,知道应用程序在崩溃时正在做什么将是有用的。崩溃是否一致?如果是这样,你在做什么?