Currently in the process of moving one of our iOS titles over to Android, and have spent the last few hours trying to figure out a nasty startup crash.
The Unity VM start without a hitch, and the loading scene successfully loads and runs. We also seem to be getting through at least the first update, as several debug logs manage to make their way through. Earlier, I was testing with a Droid, which indicated a segmentation fault but supplied no backtrace. Thankfully, a second device was able to give me the following:
W/dalvikvm( 3123): JNI WARNING: JNI method called with exception raised
W/dalvikvm( 3123): in Lcom/unity3d/player/UnityPlayer;.nativeRender ()Z (NewStringUTF)
W/dalvikvm( 3123): Pending exception is:
I/dalvikvm( 3123): Ljava/lang/ClassCastException;: java.lang.Float
I/dalvikvm( 3123): at android.app.ContextImpl$SharedPreferencesImpl.getInt(ContextImpl.java:2728)
I/dalvikvm( 3123): at com.unity3d.player.PlayerPrefs.GetInt((null):-1)
I/dalvikvm( 3123): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
I/dalvikvm( 3123): at com.unity3d.player.UnityPlayer.onDrawFrame((null):-1)
I/dalvikvm( 3123): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
I/dalvikvm( 3123): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
I/dalvikvm( 3123): "GLThread 9" prio=5 tid=8 NATIVE
I/dalvikvm( 3123): | group="main" sCount=0 dsCount=0 s=N obj=0x46929c78 self=0x237550
I/dalvikvm( 3123): | sysTid=3135 nice=0 sched=0/0 cgrp=default handle=2324112
I/dalvikvm( 3123): | schedstat=( 11201186000 1066999000 8634 )
I/dalvikvm( 3123): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
I/dalvikvm( 3123): at com.unity3d.player.UnityPlayer.onDrawFrame((null):-1)
I/dalvikvm( 3123): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
I/dalvikvm( 3123): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
An earlier version of the application had been able to without any errors, but that build was several months ago and a large number of changes have been made. I’ll continue to explore the problem on my end, and if I find the solution will post, but if anyone has any insight into the matter help would be greatly appreciated.
Additional Details:
-The project is using prime31’s GameCenter, Social Media, Etcetera, and Native Toolkit plugins for the iOS build. In addition to the existing Application.platform checks, I have added platform specific compilation definitions to all functions
Went through and #pragma strict’ed everything to see if that was the issue, but still receiving the fault.
Here’s some more data and the stack from adb DEBUG:
07-20 19:48:05.197 1154 1154 I DEBUG : pid: 17587, tid: 17594 >>> com.PuppyPunch.AGWB <<<
07-20 19:48:05.197 1154 1154 I DEBUG : signal 11 (SIGSEGV), fault addr 00000011
07-20 19:48:05.197 1154 1154 I DEBUG : r0 00000001 r1 00000001 r2 4afd82f7 r3 aca486d4
07-20 19:48:05.197 1154 1154 I DEBUG : r4 00000001 r5 00000001 r6 0023fa00 r7 4afd82f7
07-20 19:48:05.197 1154 1154 I DEBUG : r8 00000001 r9 4afd831c 10 4c25cfe0 fp 4afd8380
07-20 19:48:05.197 1154 1154 I DEBUG : ip 4571cf28 sp 4afd82b8 lr aca41bf9 pc aca4a456 cpsr 00000030
07-20 19:48:05.197 1154 1154 I DEBUG : d0 643a64696f72646e d1 6472656767756265
07-20 19:48:05.197 1154 1154 I DEBUG : d2 028c038b048a056d d3 0d4401980e440165
07-20 19:48:05.197 1154 1154 I DEBUG : d4 e1a0000a1a000000 d5 e592c000e28b2008
07-20 19:48:05.205 1154 1154 I DEBUG : d6 e58ec000e592e004 d7 e89daff0e282d068
07-20 19:48:05.205 1154 1154 I DEBUG : d8 400d39364069c9b3 d9 0000000000000000
07-20 19:48:05.205 1154 1154 I DEBUG : d10 0000000000000000 d11 0000000000000000
07-20 19:48:05.205 1154 1154 I DEBUG : d12 0000000000000000 d13 0000000000000000
07-20 19:48:05.205 1154 1154 I DEBUG : d14 0000000000000000 d15 0000000000000000
07-20 19:48:05.205 1154 1154 I DEBUG : d16 0000000000000001 d17 36c3e9434058af91
07-20 19:48:05.205 1154 1154 I DEBUG : d18 bf56c087e80f1e27 d19 39d282e7a7c8eec2
07-20 19:48:05.205 1154 1154 I DEBUG : d20 3fa55553e1053a42 d21 39d282e7a7c8eec2
07-20 19:48:05.205 1154 1154 I DEBUG : d22 bebbbd41c5d26bed d23 3ef99342e0ee5069
07-20 19:48:05.205 1154 1154 I DEBUG : d24 3e66376972bea4d0 d25 c010000000000000
07-20 19:48:05.205 1154 1154 I DEBUG : d26 3ff6a09e00000000 d27 bd051b04f249c8f9
07-20 19:48:05.205 1154 1154 I DEBUG : d28 c0000000126055cc d29 be826055c546c13a
07-20 19:48:05.205 1154 1154 I DEBUG : d30 bb2de24bbb5af90b d31 bd302b5727400000
07-20 19:48:05.205 1154 1154 I DEBUG : scr 80000012
07-20 19:48:05.205 1154 1154 I DEBUG :
07-20 19:48:05.283 1154 1154 I DEBUG : #00 pc 0004a456 /system/lib/libdvm.so
07-20 19:48:05.283 1154 1154 I DEBUG : #01 pc 00041bf4 /system/lib/libdvm.so
07-20 19:48:05.283 1154 1154 I DEBUG :
07-20 19:48:05.283 1154 1154 I DEBUG : code around pc:
07-20 19:48:05.283 1154 1154 I DEBUG : aca4a434 00526883 0010f113 eb00688b f1130044
07-20 19:48:05.283 1154 1154 I DEBUG : aca4a444 eb010110 f7c6014c bd10eb8c 4604b570
07-20 19:48:05.283 1154 1154 I DEBUG : aca4a454 6903b328 7cfff240 69456881 0610f111
07-20 19:48:05.283 1154 1154 I DEBUG : aca4a464 0643eb06 462a2300 e00d4618 f1015af1
07-20 19:48:05.283 1154 1154 I DEBUG : aca4a474 f1be3eff d9050f7e d9014561 e0023003
07-20 19:48:05.283 1154 1154 I DEBUG :
07-20 19:48:05.283 1154 1154 I DEBUG : code around lr:
07-20 19:48:05.283 1154 1154 I DEBUG : aca41bd8 bf00460d 4630a300 18e42101 f0064617
07-20 19:48:05.283 1154 1154 I DEBUG : aca41be8 b175fd9b 2001b10f 46287038 fc2cf008
07-20 19:48:05.283 1154 1154 I DEBUG : aca41bf8 b9304605 49084a07 462a18a0 f7f91861
07-20 19:48:05.283 1154 1154 I DEBUG : aca41c08 4630fdd1 f0062107 4628fd87 81f0e8bd
07-20 19:48:05.283 1154 1154 I DEBUG : aca41c18 0005a814 fffe46ac fffe6d14 6904b570
07-20 19:48:05.283 1154 1154 I DEBUG :
07-20 19:48:05.283 1154 1154 I DEBUG : stack:
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8278 00000007
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd827c 4209f64c /dev/ashmem/dalvik-LinearAlloc (deleted)
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8280 4afd8334
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8284 0023fa00 [heap]
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8288 0023fa00 [heap]
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd828c 45877198 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8290 0025bc28 [heap]
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8294 aca42571 /system/lib/libdvm.so
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd8298 4afd82a8
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd829c 4afd82dc
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82a0 0023fa00 [heap]
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82a4 00000001
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82a8 00000007
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82ac 4afd82f7
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82b0 e3a070ad
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82b4 ef9000ad
07-20 19:48:05.283 1154 1154 I DEBUG : #00 4afd82b8 aca9c3f4 /system/lib/libdvm.so
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82bc 00000001
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82c0 0023fa00 [heap]
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82c4 aca41bf9 /system/lib/libdvm.so
07-20 19:48:05.283 1154 1154 I DEBUG : #01 4afd82c8 4ada9870
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82cc 4588ac08 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82d0 4588abb8 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
07-20 19:48:05.283 1154 1154 I DEBUG : 4afd82d4 0000a570 [heap]
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82d8 00000001
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82dc 4a8d0948
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82e0 4588ac08 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82e4 00f21c50 [heap]
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82e8 4d569e28
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82ec 98cff900
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82f0 0025bc28 [heap]
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82f4 01fd834c
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82f8 4afd834c
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd82fc 4afd8334
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd8300 4afd831c
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd8304 afd4a9f8
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd8308 4c25cfe0
07-20 19:48:05.290 1154 1154 I DEBUG : 4afd830c 8101b320 /data/data/com.PuppyPunch.AGWB/lib/libmono.so
07-20 19:48:05.720 1264 1401 I ActivityManager: Process com.PuppyPunch.AGWB (pid 17587) has died.