简体   繁体   English

JNI ERROR(app bug):本地参考表溢出(max = 512)

[英]JNI ERROR (app bug): local reference table overflow (max=512)

I am trying to run the LibSVMAndroidClassification Android project with my own dataset. 我试图用我自己的数据集运行LibSVMAndroidClassification Android项目。 It works perfectly fine with the dataset already provided and it also works fine when I use my csv with 100 rows (which is less than 1% of original size). 它与已经提供的数据集完美配合,当我使用100行(小于原始大小的1%)的csv时,它也可以正常工作。 But when I try to go for "Train CSV" with for eg 1000 rows then I see this error. 但是当我尝试使用例如1000行的“Train CSV”时,我看到了这个错误。 I even tried to set android:largeHeap="true" in Manifest.xml but nothing improved. 我甚至试图在Manifest.xml中设置android:largeHeap =“true”但没有任何改进。

This is my logcat dump. 这是我的logcat转储。

10-31 17:49:06.745: E/dalvikvm(2008): JNI ERROR (app bug): local reference table overflow (max=512)
10-31 17:49:06.745: W/dalvikvm(2008): JNI local reference table (0x754057e0) dump:
10-31 17:49:06.745: W/dalvikvm(2008): Last 10 entries (of 512):
10-31 17:49:06.745: W/dalvikvm(2008): 511: 0x42d900b0 double
10-31 17:49:06.745: W/dalvikvm(2008): 510: 0x42a19698 int
10-31 17:49:06.745: W/dalvikvm(2008): 509: 0x42d8ff78 double
10-31 17:49:06.745: W/dalvikvm(2008): 508: 0x42a195f0 int
10-31 17:49:06.745: W/dalvikvm(2008): 507: 0x42d8fe40 double
10-31 17:49:06.745: W/dalvikvm(2008): 506: 0x42a19548 int
10-31 17:49:06.745: W/dalvikvm(2008): 505: 0x42d8fd08 double
10-31 17:49:06.745: W/dalvikvm(2008): 504: 0x42a194a0 int
10-31 17:49:06.745: W/dalvikvm(2008): 503: 0x42d8fbd0 double
10-31 17:49:06.745: W/dalvikvm(2008): 502: 0x42a193f8 int
10-31 17:49:06.745: W/dalvikvm(2008): Summary:
10-31 17:49:06.745: W/dalvikvm(2008): 5 of java.lang.Class (4 unique instances)
10-31 17:49:06.745: W/dalvikvm(2008): 3 of java.lang.String (3 unique instances)
10-31 17:49:06.745: W/dalvikvm(2008): 249 of int (249 unique instances)
10-31 17:49:06.745: W/dalvikvm(2008): 1 of int
10-31 17:49:06.745: W/dalvikvm(2008): 250 of double (250 unique instances)
10-31 17:49:06.745: W/dalvikvm(2008): 1 of java.lang.String
10-31 17:49:06.745: W/dalvikvm(2008): 1 of int[]
10-31 17:49:06.745: W/dalvikvm(2008): 1 of edu.sinica.citi.mac.android.actclassification.ActClassificationActivity
10-31 17:49:06.745: W/dalvikvm(2008): 1 of double[]
10-31 17:49:06.745: E/dalvikvm(2008): Failed adding to JNI local ref table (has 512 entries)
10-31 17:49:06.745: I/dalvikvm(2008): "main" prio=5 tid=1 RUNNABLE
10-31 17:49:06.745: I/dalvikvm(2008): | group="main" sCount=0 dsCount=0 obj=0x42027710 self=0x420115f0
10-31 17:49:06.745: I/dalvikvm(2008): | sysTid=2008 nice=0 sched=0/0 cgrp=apps handle=1074106620
10-31 17:49:06.745: I/dalvikvm(2008): | state=R schedstat=( 774483646 137982240 4930 ) utm=59 stm=18 core=1
10-31 17:49:06.745: I/dalvikvm(2008): at edu.sinica.citi.mac.android.actclassification.ActClassificationActivity.svmtrain(Native Method)
10-31 17:49:06.745: I/dalvikvm(2008): at edu.sinica.citi.mac.android.actclassification.ActClassificationActivity.train_csv(ActClassificationActivity.java:329)
10-31 17:49:06.745: I/dalvikvm(2008): at edu.sinica.citi.mac.android.actclassification.ActClassificationActivity$2.onClick(ActClassificationActivity.java:125)
10-31 17:49:06.745: I/dalvikvm(2008): at android.view.View.performClick(View.java:4249)
10-31 17:49:06.745: I/dalvikvm(2008): at android.view.View$PerformClick.run(View.java:17764)
10-31 17:49:06.745: I/dalvikvm(2008): at android.os.Handler.handleCallback(Handler.java:730)
10-31 17:49:06.745: I/dalvikvm(2008): at android.os.Handler.dispatchMessage(Handler.java:92)
10-31 17:49:06.745: I/dalvikvm(2008): at android.os.Looper.loop(Looper.java:137)
10-31 17:49:06.745: I/dalvikvm(2008): at android.app.ActivityThread.main(ActivityThread.java:5137)
10-31 17:49:06.745: I/dalvikvm(2008): at java.lang.reflect.Method.invokeNative(Native Method)
10-31 17:49:06.745: I/dalvikvm(2008): at java.lang.reflect.Method.invoke(Method.java:525)
10-31 17:49:06.745: I/dalvikvm(2008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:752)
10-31 17:49:06.745: I/dalvikvm(2008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:568)
10-31 17:49:06.745: I/dalvikvm(2008): at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
10-31 17:49:06.745: I/dalvikvm(2008): at dalvik.system.NativeStart.main(Native Method)
10-31 17:49:06.745: E/dalvikvm(2008): VM aborting
10-31 17:49:06.745: A/libc(2008): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 2008 (tclassification)

I have googled a lot but still I am unable to understand the background and reason behind this. 我搜索了很多,但我仍然无法理解背后的原因和原因。 Many people have faced this same error in different situations. 许多人在不同情况下都面临同样的错误。 What can be a suitable pointer to the solution ? 什么是解决方案的合适指针?

Thanks in advance ! 提前致谢 !

you'd better use DeleteLocalRef to delete the local reference that never be used later. 您最好使用DeleteLocalRef删除以后永远不会使用的本地引用。 eg 例如

for (int i = 0; i < 512; i++)
{
        jobject obj = env->GetObjectArrayElement(array, i);
        //your code here    
        env->DeleteLocalRef(obj);   
}

暂无
暂无

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

相关问题 JNI ERROR(app bug):本地参考表溢出(max = 512),即使没有本机代码也是如此 - JNI ERROR (app bug): local reference table overflow (max=512) even with out Native Code android - kotlin,自定义视图,绑定,膨胀 - JNI 错误(应用程序错误):本地引用表溢出(最大值 = 512) - android - kotlin, custom view, binding, inflating - JNI ERROR (app bug): local reference table overflow (max=512) E/dalvikvm: JNI ERROR (app bug): local reference table overflow (max=512) - E/dalvikvm: JNI ERROR (app bug): local reference table overflow (max=512) JNI错误(应用错误):本地参考表溢出(最大值= 512)Android - JNI ERROR (app bug): local reference table overflow (max=512) Android Android Webrtc JNI错误(应用程序错误):本地引用表溢出(最大值= 512) - Android Webrtc JNI ERROR (app bug): local reference table overflow (max=512) Android:JNI错误(app bug):本地引用表溢出(max = 512) - Android : JNI ERROR (app bug): local reference table overflow (max=512) Google ML Kit JNI ERROR (app bug): local reference table overflow (max=512) on rk3399 主板 - Google ML Kit JNI ERROR (app bug): local reference table overflow (max=512) on rk3399 motherboard JNI错误:本地引用表溢出512个条目 - JNI error : Local reference table overflow 512 entries JNI错误(应用程序错误):Xamarin.Android中弱的全局引用表溢出(最大值= 51200) - JNI ERROR (app bug): weak global reference table overflow (max=51200) in Xamarin.Android Unity JNI ERROR(应用程序错误):全局引用表溢出 - Unity JNI ERROR (app bug): global reference table overflow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM