Android player crashes on startup

I’m using Unity 5.3.4f1.

I upgraded the Android SDK to 23 rev. 3 and now my game crashes on startup.
Here’s what I have installed now:

I don’t really even know where to start debugging this problem. It looks like it’s crashing on libunity.so but I’m not sure. Please help as my game was ready for release and now this is blocking me. I can’t even rollback to the previous Android SDK rev as I wasn’t keeping it in source control nor does the tool allow me to. Thank you for any help or insight you can provide.

Here’s the relevant part of the log:

I/Unity (21644): Logging event.

I/Unity (21644):

I/Unity (21644): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

I/Unity (21644):

E/art (21644): JNI ERROR (app bug): accessed stale local reference 0x200001 (index 0 in a table of size 0)

F/art (21644): art/runtime/indirect_reference_table.cc:65] JNI ERROR (app bug): see above.

F/art (21644): art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count

F/art (21644): art/runtime/runtime.cc:366] Runtime aborting — recursively, so no thread-specific detail!

F/art (21644): art/runtime/runtime.cc:366]

F/libc (21644): Fatal signal 6 (SIGABRT), code -6 in tid 21710 (Thread-676)

D/AudioFlinger( 1862): mixer(0xb3ec0000) throttle end: throttle time(12)

F/DEBUG ( 1859):

F/DEBUG ( 1859): Build fingerprint: ‘google/shamu/shamu:6.0.1/MMB30G/2756603:user/release-keys’

F/DEBUG ( 1859): Revision: ‘0’

F/DEBUG ( 1859): ABI: ‘arm’

F/DEBUG ( 1859): pid: 21644, tid: 21710, name: Thread-676 >>> com.AngryElement.CommunityChess <<<

F/DEBUG ( 1859): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

W/debuggerd( 1859): type=1400 audit(0.0:2336): avc: denied { search } for name=“com.AngryElement.CommunityChess” dev=“dm-1” ino=416667 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0

F/DEBUG ( 1859): Abort message: ‘art/runtime/indirect_reference_table.cc:65] JNI ERROR (app bug): see above.’

F/DEBUG ( 1859): r0 00000000 r1 000054ce r2 00000006 r3 907ec978

F/DEBUG ( 1859): r4 907ec980 r5 907ec930 r6 00000001 r7 0000010c

F/DEBUG ( 1859): r8 b4c7f800 r9 b4c7de44 sl 913edb5b fp b4c63450

F/DEBUG ( 1859): ip 00000006 sp 907ebd30 lr b6c9eb61 pc b6ca0f50 cpsr 40070010

F/DEBUG ( 1859):

F/DEBUG ( 1859): backtrace:

F/DEBUG ( 1859): #00 pc 00041f50 /system/lib/libc.so (tgkill+12)

F/DEBUG ( 1859): #01 pc 0003fb5d /system/lib/libc.so (pthread_kill+32)

F/DEBUG ( 1859): #02 pc 0001c30f /system/lib/libc.so (raise+10)

F/DEBUG ( 1859): #03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)

F/DEBUG ( 1859): #04 pc 000174ac /system/lib/libc.so (abort+4)

F/DEBUG ( 1859): #05 pc 00333971 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+228)

F/DEBUG ( 1859): #06 pc 000f45fb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+2226)

F/DEBUG ( 1859): #07 pc 000f08d1 /system/lib/libart.so (_ZN3art7BarrierD2Ev+216)

F/DEBUG ( 1859): #08 pc 0035b473 /system/lib/libart.so (ZN3art10ThreadList4DumpERNSt3_113basic_ostreamIcNS1_11char_traitsIcEEEE+162)

F/DEBUG ( 1859): #09 pc 00333a35 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+424)

F/DEBUG ( 1859): #10 pc 000f45fb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+2226)

F/DEBUG ( 1859): #11 pc 001de265 /system/lib/libart.so (_ZN3art22IndirectReferenceTable17AbortIfNoCheckJNIEv+64)

F/DEBUG ( 1859): #12 pc 003512bb /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+846)

F/DEBUG ( 1859): #13 pc 0032bd43 /system/lib/libart.so (_ZN3art17InvokeWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+402)

F/DEBUG ( 1859): #14 pc 002727c5 /system/lib/libart.so (_ZN3art3JNI23CallStaticObjectMethodAEP7_JNIEnvP7_jclassP10_jmethodIDP6jvalue+340)

F/DEBUG ( 1859): #15 pc 007dc0ac /data/app/com.AngryElement.CommunityChess-1/lib/arm/libunity.so

F/DEBUG ( 1859): #16 pc 0000be34

I/AudioFlinger( 1862): BUFFER TIMEOUT: remove(4098) from active list on thread 0xb3ec0000

W/ActivityManager( 2273): Force finishing activity com.AngryElement.CommunityChess/com.unity3d.player.UnityPlayerActivity

F/DEBUG ( 1859):

F/DEBUG ( 1859): Tombstone written to: /data/tombstones/tombstone_07

I fixed this myself. It was related to deserializing a protobuf-formatted binary file that was saved using an old version of the code.

using (var fileStm = File.OpenRead(profileFile)) profile = ClientSerializer.The.Deserialize(fileStm);

ClientSerializer is a protobuf serializer. I read someplace that because of Proguard’s obfuscation, stack traces get messed up so that lead me here.