question

ibocon avatar image
0 Votes"
ibocon asked RobCaplan edited

Xamarin.Android JNI ERROR accessed deleted Global 0x606a

I am having a uncatchable error like below.
Where should I start to debug this kind of error?

I guess this is a memory leak issue or referencing deleted object by GC.
However, error message does not give me any clue why this is happening or where should I start to dig in...

You can check out vimeo

JNI ERROR (app bug): accessed deleted Global 0x606a
[java_vm_ext.cc] JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0x606a
[java_vm_ext.cc] "Thread-28" prio=10 tid=34 Runnable
[java_vm_ext.cc]   | group="main" sCount=0 dsCount=0 flags=0 obj=0x13080000 self=0x7ac5a58c00
[java_vm_ext.cc]   | sysTid=8181 nice=-10 cgrp=default sched=0/0 handle=0x7aaabfd4f0
[java_vm_ext.cc]   | state=R schedstat=( 237903034 19270156 585 ) utm=20 stm=3 core=3 HZ=100
[java_vm_ext.cc]   | stack=0x7aaa9fe000-0x7aaaa00000 stackSize=2MB
[java_vm_ext.cc]   | held mutexes= "mutator lock"(shared held)
[java_vm_ext.cc]   native: #00 pc 00000000003cb654  /system/lib64/libart.so 

// ...

[libc] Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 8181 (GLThread 25), pid 7983 (ngoslab.lithium)

Here is full error log


dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, ibocon. Will the project crash in debug mode? If so, please add breakpoints to debug the code to get which reference is deleted.

0 Votes 0 ·

Hi @JarvanZhang-MSFT, I found a reason. When invalidate SKGLView surface, I get into JNI Error. Therefore, I change SKGLView to SKCanvasView. After that issue is solved.

0 Votes 0 ·

Congrats! And thanks for sharing the solution.

1 Vote 1 ·

0 Answers