felipecsl/ktnes

JNI crash use of deleted local reference 0x200021

Closed this issue · 3 comments

I encountered a JNI error (Android 7.0 Meizu PRO 7-S):
A/art: art/runtime/java_vm_ext.cc:496] JNI DETECTED ERROR IN APPLICATION: use of deleted local reference 0x200021
...
art/runtime/runtime.cc:406] "main" prio=5 tid=1 Runnable
art/runtime/runtime.cc:406] | group="" sCount=0 dsCount=0 obj=0x7520c768 self=0x76ac496a00
art/runtime/runtime.cc:406] | sysTid=13003 nice=0 cgrp=default sched=0/0 handle=0x76b0b5da98
art/runtime/runtime.cc:406] | state=R schedstat=( 1228365157 308057765 1518 ) utm=111 stm=11 core=5 HZ=100
art/runtime/runtime.cc:406] | stack=0x7fd33f8000-0x7fd33fa000 stackSize=8MB
art/runtime/runtime.cc:406] | held mutexes= "mutator lock"(shared held)
art/runtime/runtime.cc:406] native: #00 pc 000000000047cd80 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
art/runtime/runtime.cc:406] native: #1 pc 000000000047cd7c /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
art/runtime/runtime.cc:406] native: #2 pc 0000000000450ef8 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480)
art/runtime/runtime.cc:406] native: #3 pc 0000000000468a6c /system/lib64/libart.so (ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+832)
art/runtime/runtime.cc:406] native: #4 pc 0000000000451e5c /system/lib64/libart.so (ZN3art6Thread21RunCheckpointFunctionEv+192)
art/runtime/runtime.cc:406] native: #5 pc 000000000054be88 /system/lib64/libart.so (artTestSuspendFromCode+24)
art/runtime/runtime.cc:406] native: #6 pc 00000000000db9d4 /system/lib64/libart.so (art_quick_test_suspend+68)
art/runtime/runtime.cc:406] native: #7 pc 00000000001c34d4 /data/dalvik-cache/arm64/system@framework@boot.oat (Java_java_util_ArrayList_00024Itr_next
+320)
art/runtime/runtime.cc:406] at java.util.ArrayList$Itr.next(ArrayList.java:830)
art/runtime/runtime.cc:406] at kotlin.collections.CollectionsKt___CollectionsKt.toIntArray(_Collections.kt:1013)
art/runtime/runtime.cc:406] at com.felipecsl.knes.INESFileParser$Companion.parseCartridge(INESFileParser.kt:49)
art/runtime/runtime.cc:406] at com.felipecsl.knes.Director.(Director.kt:17)
art/runtime/runtime.cc:406] at com.felipecsl.knes.Director.(Director.kt:14)
art/runtime/runtime.cc:406] at com.felipecsl.knes.app.MainActivity.startConsole(MainActivity.kt:125)
art/runtime/runtime.cc:406] at com.felipecsl.knes.app.MainActivity.onClickPlayPause(MainActivity.kt:91)
art/runtime/runtime.cc:406] at com.felipecsl.knes.app.MainActivity.access$onClickPlayPause(MainActivity.kt:21)
art/runtime/runtime.cc:406] at com.felipecsl.knes.app.MainActivity$onCreate$1.onClick(MainActivity.kt:70)
art/runtime/runtime.cc:406] at android.view.View.performClick(View.java:5730)
art/runtime/runtime.cc:406] at android.view.View$PerformClick.run(View.java:22808)
art/runtime/runtime.cc:406] at android.os.Handler.handleCallback(Handler.java:836)
art/runtime/runtime.cc:406] at android.os.Handler.dispatchMessage(Handler.java:103)
art/runtime/runtime.cc:406] at android.os.Looper.loop(Looper.java:203)
art/runtime/runtime.cc:406] at android.app.ActivityThread.main(ActivityThread.java:6494)
art/runtime/runtime.cc:406] at java.lang.reflect.Method.invoke!(Native method)
art/runtime/runtime.cc:406] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
art/runtime/runtime.cc:406] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:974)
art/runtime/runtime.cc:406]
art/runtime/runtime.cc:406] "Jit thread pool worker thread 0" prio=10 tid=2 Native (still starting up)

It is working well on Android 5.1.

This is what happened after I clicked the start button(at Right|Buttom)

I can't reproduce that. Which ROM are you trying to run?