如果有人能帮助我解决以下问题,我将非常感激:
启动崩溃
仅在“发布”模式下以及取消选中“使用共享运行时”复选框时才会出现此问题。遗憾的是,归档(并因此分发)应用程序会强制您取消选中此选项。
由于我从未使用Xamarin开发过应用程序,所以我对于该做什么一无所知。这个应用程序是几年前由很久以前离开公司的人开发的。
使用调试配置在本地运行应用程序,一切正常。但是,当我切换到发布配置时,应用程序崩溃并输出以下内容:
02-13 15:04:54.847 E/art ( 6038): JNI ERROR (app bug): accessed stale local reference 0xec9d54d5 (index 21813 in a table of size 66)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: use of deleted local reference 0xec9d54d5
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] from void mono.android.Runtime.init(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.ClassLoader, java.lang.String[], java.lang.String[], java.lang.String)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] "main" prio=5 tid=1 Runnable
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x762de280 self=0xece05400
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] | sysTid=6038 nice=-10 cgrp=default sched=0/0 handle=0xf00f2534
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 386098851 11374041 344 ) utm=20 stm=18 core=4 HZ=100
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] | stack=0xff5fa000-0xff5fc000 stackSize=8MB
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #00 pc 0034ecc5 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #01 pc 0032f481 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+308)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #02 pc 00238765 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+848)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #03 pc 00238cfb /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+66)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #04 pc 00332ea9 /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+240)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #05 pc 000c9b61 /system/lib/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+120)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #06 pc 000c9113 /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+190)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #07 pc 000ca14b /system/lib/libart.so (_ZN3art11ScopedCheck12CheckVarArgsERNS_18ScopedObjectAccessEPKNS_7VarArgsE+186)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #08 pc 000c90c1 /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+108)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #09 pc 000c854b /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+802)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #10 pc 000cc6f7 /system/lib/libart.so (_ZN3art8CheckJNI13CheckCallArgsERNS_18ScopedObjectAccessERNS_11ScopedCheckEP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDNS_10InvokeTypeEPKNS_7VarArgsE+114)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #11 pc 000cbd25 /system/lib/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDSt9__va_listNS_9Primitive4TypeENS_10InvokeTypeE+512)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #12 pc 000c1507 /system/lib/libart.so (_ZN3art8CheckJNI16CallObjectMethodEP7_JNIEnvP8_jobjectP10_jmethodIDz+50)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] native: #13 pc 000063c0 (???)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at mono.android.Runtime.init(Native method)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:49)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:22)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread.installProvider(ActivityThread.java:6420)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread.installContentProviders(ActivityThread.java:6012)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5951)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread.-wrap3(ActivityThread.java:-1)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.os.Handler.dispatchMessage(Handler.java:102)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.os.Looper.loop(Looper.java:154)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at android.app.ActivityThread.main(ActivityThread.java:6776)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at java.lang.reflect.Method.invoke!(Native method)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
02-13 15:04:54.900 F/art ( 6038): art/runtime/java_vm_ext.cc:470]
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] Runtime aborting...
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] Aborting thread:
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] "main" prio=10 tid=1 Native
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] | group="" sCount=0 dsCount=0 obj=0x762de280 self=0xece05400
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] | sysTid=6038 nice=-10 cgrp=default sched=0/0 handle=0xf00f2534
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] | state=R schedstat=( 406851471 11806888 420 ) utm=21 stm=18 core=4 HZ=100
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] | stack=0xff5fa000-0xff5fc000 stackSize=8MB
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] | held mutexes= "abort lock"
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #00 pc 0034ecc5 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #01 pc 0032f481 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+308)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #02 pc 003224f9 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+24)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #03 pc 00322381 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+424)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #04 pc 0031911b /system/lib/libart.so (_ZN3art7Runtime5AbortEv+90)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #05 pc 000b4ac1 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+864)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #06 pc 00238a95 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1664)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #07 pc 00238cfb /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+66)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #08 pc 00332ea9 /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+240)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #09 pc 000c9b61 /system/lib/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+120)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #10 pc 000c9113 /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+190)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #11 pc 000ca14b /system/lib/libart.so (_ZN3art11ScopedCheck12CheckVarArgsERNS_18ScopedObjectAccessEPKNS_7VarArgsE+186)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #12 pc 000c90c1 /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+108)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #13 pc 000c854b /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+802)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #14 pc 000cc6f7 /system/lib/libart.so (_ZN3art8CheckJNI13CheckCallArgsERNS_18ScopedObjectAccessERNS_11ScopedCheckEP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDNS_10InvokeTypeEPKNS_7VarArgsE+114)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #15 pc 000cbd25 /system/lib/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDSt9__va_listNS_9Primitive4TypeENS_10InvokeTypeE+512)
02-13 15:04:54.954 F/art ( 6038): art/runtime/runtime.cc:419] native: #16 pc 000c1507 /system/lib/libart.so (_ZN3art8CheckJNI16CallObjectMethodEP7_JNIEnvP8_jobjectP10_jmethodIDz+50)
有任何线索吗?
我无法粘贴整个堆栈跟踪,因为stackoverflow只允许我输入30.000个字符。如果需要,我会发布更多内容。
干杯