我的应用程序(在Unity中制作)在编辑器和真正的iphone上加载主级别屏幕没问题。但是,当级别开始加载时,任何Android设备似乎都会崩溃。
我使用adb和MonoDevelop的'Attach to Process',异常断点设置为:System.Exception,但是当应用程序崩溃时,它永远不会遇到任何断点。
因此,唯一的选择(我认为?)是使用adb logcat。以下是输出。
我试图破译这个与JNI相关的错误,并怀疑“DeleteLocalRef”代码可能是个问题。但是,因为我使用Unity with C sharp,搜索'DeleteLocalRef'并不返回任何内容(因为我认为这是一种Java方法)。任何人都可以帮助这个调试吗?很高兴提供可能有帮助的任何进一步信息?
--------- beginning of crash
F/google-breakpad(14111): Microdump skipped (uninteresting)
W/google-breakpad(13729): ### ### ### ### ### ### ### ### ### ### ### ### ###
W/google-breakpad(13729): Chrome build fingerprint:
W/google-breakpad(13729): 1.13
W/google-breakpad(13729): 1522409910
W/google-breakpad(13729): ### ### ### ### ### ### ### ### ### ### ### ### ###
F/libc (13729): Fatal signal 6 (SIGABRT), code -6 in tid 13756 (main)
I/DEBUG ( 184): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 184): Build fingerprint: 'google/occam/mako:5.1.1/LMY47V/1836172:user/release-keys'
I/DEBUG ( 184): Revision: '11'
I/DEBUG ( 184): ABI: 'arm'
I/DEBUG ( 184): pid: 13729, tid: 13756, name: main >>> com.seligmanventures.FantasySurvivor <<<
I/DEBUG ( 184): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG ( 184): Abort message: 'art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: native code passing in reference to invalid local reference: 0x200005'
I/DEBUG ( 184): r0 00000000 r1 000035bc r2 00000006 r3 00000000
I/DEBUG ( 184): r4 a1fa1dd8 r5 00000006 r6 0000000b r7 0000010c
I/DEBUG ( 184): r8 00000000 r9 b8f4a938 sl b9133430 fp 00000001
I/DEBUG ( 184): ip 000035bc sp a1f9f2f0 lr b6e24989 pc b6e4a8f4 cpsr 60070010
I/DEBUG ( 184):
I/DEBUG ( 184): backtrace:
I/DEBUG ( 184): #00 pc 0003c8f4 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 184): #01 pc 00016985 /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 184): #02 pc 00017597 /system/lib/libc.so (raise+10)
I/DEBUG ( 184): #03 pc 00013d3d /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG ( 184): #04 pc 000124ec /system/lib/libc.so (abort+4)
I/DEBUG ( 184): #05 pc 00228caf /system/lib/libart.so (art::Runtime::Abort()+170)
I/DEBUG ( 184): #06 pc 000a73f1 /system/lib/libart.so (art::LogMessage::~LogMessage()+1360)
I/DEBUG ( 184): #07 pc 000b1b97 /system/lib/libart.so (art::JniAbort(char const*, char const*)+1118)
I/DEBUG ( 184): #08 pc 000b20d5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
I/DEBUG ( 184): #09 pc 000b45bb /system/lib/libart.so (_ZN3art11ScopedCheck5CheckEbPKcz.constprop.129+710)
I/DEBUG ( 184): #10 pc 000b7349 /system/lib/libart.so (art::CheckJNI::DeleteLocalRef(_JNIEnv*, _jobject*)+68)
I/DEBUG ( 184): #11 pc 0015a993 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libgpg.so (gpg::JavaReference::~JavaReference()+54)
I/DEBUG ( 184): #12 pc 00159953 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libgpg.so
I/DEBUG ( 184): #13 pc 0003ac25 /system/lib/libc.so (__cxa_finalize+132)
I/DEBUG ( 184): #14 pc 000119bb /system/lib/libc.so (exit+6)
I/DEBUG ( 184): #15 pc 0012b47d /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #16 pc 0037dd5b /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #17 pc 0037e375 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #18 pc 00380a25 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #19 pc 0037d7f9 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #20 pc 00193899 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #21 pc 00193969 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #22 pc 00303833 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #23 pc 000c09f9 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #24 pc 000a0c59 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #25 pc 00046663 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #26 pc 00046953 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #27 pc 00046bb5 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #28 pc 000f9fbf /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #29 pc 000fc4a1 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #30 pc 000fbca9 /system/vendor/lib/libsc-a3xx.so
I/DEBUG ( 184): #31 pc 000fe1e7 /system/vendor/lib/libsc-a3xx.so (__link_shaders+338)
I/DEBUG ( 184): #32 pc 000669ab /system/vendor/lib/egl/libGLESv2_adreno.so (core_glLinkProgram+1046)
I/DEBUG ( 184): #33 pc 00049fe7 /system/vendor/lib/egl/libGLESv2_adreno.so (glLinkProgram+16)
I/DEBUG ( 184): #34 pc 008795f0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (GlslGpuProgramGLES::CompileProgram(unsigned int&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, ShaderChannelMask&, int)+1472)
I/DEBUG ( 184): #35 pc 008789f0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (GlslGpuProgramGLES::Create(dynamic_array<unsigned char, 1u> const&, ShaderChannelMask&)+1628)
I/DEBUG ( 184): #36 pc 008780e0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (GlslGpuProgramGLES::GlslGpuProgramGLES(dynamic_array<unsigned char, 1u> const&, CreateGpuProgramOutput&)+288)
I/DEBUG ( 184): #37 pc 0077ce3c /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (CreateGpuProgram(ShaderGpuProgramType, dynamic_array<unsigned char, 1u> const&, CreateGpuProgramOutput&)+364)
I/DEBUG ( 184): #38 pc 00e19d74 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderLab::SubProgram::Compile()+984)
I/DEBUG ( 184): #39 pc 005e89b4 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderLab::Program::CreateFromSerializedProgram(ShaderLab::SerializedProgram const&, ShaderType, int, PropertyNamesSet*, Shader const*)+184)
I/DEBUG ( 184): #40 pc 005e8280 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderLab::Pass::CreateFromSerializedPass(ShaderLab::SerializedPass const&, Shader const*)+384)
I/DEBUG ( 184): #41 pc 005e7ce0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderLab::SubShader::CreateFromSerializedSubShader(ShaderLab::SerializedSubShader const&, std::vector<PPtr<Shader>, std::allocator<PPtr<Shader> > >&, bool, Shader*)+276)
I/DEBUG ( 184): #42 pc 005e78f4 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderLab::IntShader::CreateFromSerializedShader(ShaderLab::SerializedShader const&, std::vector<PPtr<Shader>, std::allocator<PPtr<Shader> > >&, bool, Shader*)+936)
I/DEBUG ( 184): #43 pc 005e9ec0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (ShaderFromSerializedShader(ShaderLab::SerializedShader const*, std::vector<PPtr<Shader>, std::allocator<PPtr<Shader> > >&, bool, Shader*)+8)
I/DEBUG ( 184): #44 pc 005ec268 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (Shader::CreateFromParsedForm()+232)
I/DEBUG ( 184): #45 pc 005ec52c /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (Shader::CreateAndPostLoad()+36)
I/DEBUG ( 184): #46 pc 005ec4f4 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (Shader::AwakeFromLoad(AwakeFromLoadMode)+32)
I/DEBUG ( 184): #47 pc 007fd57c /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (AwakeFromLoadQueue::PersistentManagerAwakeSingleObject(Object&, AwakeFromLoadMode)+124)
I/DEBUG ( 184): #48 pc 00800658 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (PersistentManager::IntegrateObjectAndUnlockIntegrationMutexInternal(int)+112)
I/DEBUG ( 184): #49 pc 005bb3a8 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (TimeSliceAwakeFromLoadQueue::IntegrateTimeSliced(int)+1168)
I/DEBUG ( 184): #50 pc 005baee0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (LoadOperation::IntegrateTimeSliced(int)+8)
I/DEBUG ( 184): #51 pc 005bc260 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (LoadSceneOperation::IntegrateTimeSliced(int)+16)
I/DEBUG ( 184): #52 pc 005bd3d8 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)+232)
I/DEBUG ( 184): #53 pc 005bdee0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (PreloadManager::UpdatePreloading()+328)
I/DEBUG ( 184): #54 pc 005708b0 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward()+88)
I/DEBUG ( 184): #55 pc 00572310 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (PlayerLoop()+604)
I/DEBUG ( 184): #56 pc 008de244 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (UnityPlayerLoop()+572)
I/DEBUG ( 184): #57 pc 008e1978 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+56)
I/DEBUG ( 184): #58 pc 0033a82f /data/dalvik-cache/arm/data@app@com.seligmanventures.FantasySurvivor-2@base.apk@classes.dex
E/NativeCrashListener( 554): Exception dealing with report
E/NativeCrashListener( 554): android.system.ErrnoException: read failed: EAGAIN (Try again)
E/NativeCrashListener( 554): at libcore.io.Posix.readBytes(Native Method)
E/NativeCrashListener( 554): at libcore.io.Posix.read(Posix.java:165)
E/NativeCrashListener( 554): at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
E/NativeCrashListener( 554): at android.system.Os.read(Os.java:350)
E/NativeCrashListener( 554): at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
E/NativeCrashListener( 554): at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)
I/UsageStatsService( 554): User[0] Flushing usage stats to disk
E/WakeLock( 1069): release without a matched acquire!
D/audio_hw_primary( 187): disable_audio_route: reset and update mixer path: low-latency-playback
D/audio_hw_primary( 187): disable_snd_device: snd_device(2: speaker)
W/Settings( 848): Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
W/debuggerd( 184): type=1400 audit(0.0:71): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=5527 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
W/debuggerd( 184): type=1400 audit(0.0:72): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=5527 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
W/debuggerd( 184): type=1400 audit(0.0:73): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=5527 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
I/DEBUG ( 184):
I/DEBUG ( 184): Tombstone written to: /data/tombstones/tombstone_04
I/BootReceiver( 554): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
W/AudioTrack(13729): releaseBuffer() track 0xb9452c60 disabled due to previous underrun, restarting
D/audio_hw_primary( 187): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/ACDB-LOADER( 187): ACDB -> send_afe_cal
D/audio_hw_primary( 187): enable_snd_device: snd_device(2: speaker)
D/audio_hw_primary( 187): enable_audio_route: apply and update mixer path: low-latency-playback
I/WindowState( 554): WIN DEATH: Window{2bdf3df u0 com.seligmanventures.FantasySurvivor/com.unity3d.player.UnityPlayerActivity}
D/ConnectivityService( 554): ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=118, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ], android.os.BinderProxy@3ffc79cd)
W/WindowManager( 554): Force-removing child win Window{99742f5 u0 SurfaceView} from container Window{2bdf3df u0 com.seligmanventures.FantasySurvivor/com.unity3d.player.UnityPlayerActivity}
D/ConnectivityService( 554): ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=117, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ], android.os.BinderProxy@2d2a8282)
D/ConnectivityService( 554): ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=119, legacyType=-1, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ], android.os.BinderProxy@21695d93)
D/ConnectivityService( 554): releasing NetworkRequest NetworkRequest [ id=118, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
E/ConnectivityService( 554): RemoteException caught trying to send a callback msg for NetworkRequest [ id=118, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
D/ConnectivityService( 554): releasing NetworkRequest NetworkRequest [ id=117, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
E/ConnectivityService( 554): RemoteException caught trying to send a callback msg for NetworkRequest [ id=117, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
D/ConnectivityService( 554): releasing NetworkRequest NetworkRequest [ id=119, legacyType=-1, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
E/ConnectivityService( 554): RemoteException caught trying to send a callback msg for NetworkRequest [ id=119, legacyType=-1, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
W/WindowManager( 554): Failed looking up window
W/WindowManager( 554): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@8a8f82c does not exist
W/WindowManager( 554): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8539)
W/WindowManager( 554): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8530)
W/WindowManager( 554): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1142)
W/WindowManager( 554): at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
I/WindowState( 554): WIN DEATH: null
I/Zygote ( 196): Process 13729 exited due to signal (6)
I/ActivityManager( 554): Process com.seligmanventures.FantasySurvivor (pid 13729) has died
W/ActivityManager( 554): Force removing ActivityRecord{3ea119ce u0 com.seligmanventures.FantasySurvivor/com.unity3d.player.UnityPlayerActivity t611}: app died, no saved state
V/ActivityManager( 554): Display changed displayId=0
I/ActivityManager( 554): Config changes=480 {1.0 234mcc?mnc en_GB ?layoutDir sw384dp w384dp h567dp 320dpi nrml port finger -keyb/v/h -nav/h s.53}
I/InputReader( 554): Reconfiguring input devices. changes=0x00000004
I/InputReader( 554): Device reconfigured: id=6, name='touch_dev', size 768x1280, orientation 0, mode 1, display id 0
I/EmojiSearchExtension( 918): onDestroy()
I/EmojiSearchExtension( 918): onDeactivate()
I/WindowManager( 554): Screen frozen for +161ms due to Window{4d6ae01 u0 Starting com.seligmanventures.FantasySurvivor}
I/GoogleInputMethod( 918): onStartInput() : Dummy InputConnection bound
E/AndroidIME( 918): bna: name should not be empty
W/InputMethodManagerService( 554): Got RemoteException sending setActive(false) notification to pid 13729 uid 10186
I/GoogleInputMethod( 918): onStartInput() : Dummy InputConnection bound
I/art ( 554): Explicit concurrent mark sweep GC freed 39615(3MB) AllocSpace objects, 14(945KB) LOS objects, 33% free, 27MB/41MB, paused 2.136ms total 188.402ms
D/audio_hw_primary( 187): disable_audio_route: reset and update mixer path: low-latency-playback
D/audio_hw_primary( 187): disable_snd_device: snd_device(2: speaker)
更新
按照下面的BlueSilver评论,Google Play服务(排行榜)一切正常。但我刚刚删除了Google Play服务和Unity Ads,导致了不同的失败(在同一点上),我认为这可能是真正的问题?与libunity.so有关吗?
Unloading 161 Unused Serialized files (Serialized files now loaded: 0)
F/libc ( 1702): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1879 (UnityChoreograp)
F/libc ( 1702): invalid address or address of corrupt block 0xbb6e07b8 passed to dlfree
F/libc ( 1702): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadbaad in tid 1727 (UnityMain)
I/DEBUG ( 184): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 184): Build fingerprint: 'google/occam/mako:5.1.1/LMY47V/1836172:user/release-keys'
I/DEBUG ( 184): Revision: '11'
I/DEBUG ( 184): ABI: 'arm'
I/DEBUG ( 184): pid: 1702, tid: 1879, name: UnityChoreograp >>> com.seligmanventures.FantasySurvivor <<<
I/DEBUG ( 184): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
I/DEBUG ( 184): r0 00000000 r1 9a5df4c0 r2 74598b38 r3 9a5df4c8
I/DEBUG ( 184): r4 9a5df4c0 r5 a463cfb0 r6 9a5df44f r7 74598b38
I/DEBUG ( 184): r8 ba014600 r9 ffffedf8 sl 9a5df4c8 fp 9a5df400
I/DEBUG ( 184): ip a3e60a3c sp 9a5df3f0 lr a3e60ba8 pc a3e60804 cpsr 600e0010
I/DEBUG ( 184):
I/DEBUG ( 184): backtrace:
I/DEBUG ( 184): #00 pc 00f90804 /data/app/com.seligmanventures.FantasySurvivor-2/lib/arm/libunity.so (jni::Class::operator _jclass*()+16)
W/debuggerd( 184): type=1400 audit(0.0:196): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=5527 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
E/NativeCrashListener( 554): Exception dealing with report
E/NativeCrashListener( 554): android.system.ErrnoException: read failed: EAGAIN (Try again)
E/NativeCrashListener( 554): at libcore.io.Posix.readBytes(Native Method)
E/NativeCrashListener( 554): at libcore.io.Posix.read(Posix.java:165)
E/NativeCrashListener( 554): at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
E/NativeCrashListener( 554): at android.system.Os.read(Os.java:350)