- Home /
UI leads to game crash
Hey guys, I've updated my Unity to 5.1.2f1 and copied my project folder to a new PC. Now, after I build my Android game, it launches and crashes right after the splash screen. I took a look at the logcat output and it seems like it is able to finish the fist scene (OBB downloader) and then crashed due to an "Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17343 (UnityMain)"
error.
Edit: I was able to drag the issue down. It is caused by the UI. When I remove all UI elements from my scene, my game launches fine.
But I still don't know how to fix this.
Full log can be found here.
Kind regards, Tim
07-20 15:41:19.947 17797-17824/com.apophisstudios.dinsaurisland A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17824 (UnityMain)
07-20 15:41:20.049 257-257/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-20 15:41:20.049 257-257/? I/DEBUG﹕ Build fingerprint: 'oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS2I3:user/release-keys'
07-20 15:41:20.049 257-257/? I/DEBUG﹕ Revision: '0'
07-20 15:41:20.050 257-257/? I/DEBUG﹕ ABI: 'arm'
07-20 15:41:20.050 257-257/? I/DEBUG﹕ pid: 17797, tid: 17824, name: UnityMain >>> com.apophisstudios.dinsaurisland <<<
07-20 15:41:20.050 257-257/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
07-20 15:41:20.121 257-257/? I/DEBUG﹕ r0 9686c620 r1 0000003d r2 02af502b r3 00000017
07-20 15:41:20.121 257-257/? I/DEBUG﹕ r4 00000000 r5 9686c620 r6 0000003d r7 00000000
07-20 15:41:20.121 257-257/? I/DEBUG﹕ r8 00139c34 r9 9d546020 sl c4653600 fp ac9ff3b0
07-20 15:41:20.121 257-257/? I/DEBUG﹕ ip a20f0810 sp ac9ff350 lr a15735a0 pc a15735a0 cpsr 600f0010
07-20 15:41:20.122 257-257/? I/DEBUG﹕ backtrace:
07-20 15:41:20.122 257-257/? I/DEBUG﹕ #00 pc 003d15a0 /data/app/com.apophisstudios.dinsaurisland-2/lib/arm/libunity.so (Unity::Material::CreateMaterial(Shader&, int, bool)+100)
07-20 15:41:20.122 257-257/? I/DEBUG﹕ #01 pc 0072a0ec /data/app/com.apophisstudios.dinsaurisland-2/lib/arm/libunity.so (UI::GetDefaultUIMaterial()+128)
07-20 15:41:20.122 257-257/? I/DEBUG﹕ #02 pc 005825f8 /data/app/com.apophisstudios.dinsaurisland-2/lib/arm/libunity.so (Canvas_CUSTOM_GetDefaultCanvasMaterial()+40)
07-20 15:41:20.122 257-257/? I/DEBUG﹕ #03 pc 00009dbc <unknown>
07-20 15:41:20.376 16383-5460/? I/System.out﹕ There is callback from service
07-20 15:41:20.620 261-1047/? I/AudioFlinger﹕ BUFFER TIMEOUT: remove(4102) from active list on thread 0xb2401000
07-20 15:41:21.461 257-257/? I/DEBUG﹕ Tombstone written to: /data/tombstones/tombstone_06
07-20 15:41:21.469 797-819/? I/BootReceiver﹕ Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
07-20 15:41:21.472 797-4133/? E/SharedPreferencesImpl﹕ Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml
07-20 15:41:21.481 797-17962/? W/ActivityManager﹕ Force finishing activity com.apophisstudios.dinsaurisland/com.unity3d.player.UnityPlayerNativeActivity
07-20 15:41:21.530 797-1049/? I/WindowState﹕ WIN DEATH: Window{b191c50 u0 com.apophisstudios.dinsaurisland/com.unity3d.player.UnityPlayerNativeActivity}
07-20 15:41:21.538 797-1819/? I/WindowState﹕ WIN DEATH: Window{348d45f3 u0 SurfaceView}
07-20 15:41:21.565 3358-3380/? D/DropBoxFileObserver﹕ /data/system/dropbox/SYSTEM_TOMBSTONE@1437399681554.txt.gz
07-20 15:41:21.576 270-270/? I/Zygote﹕ Process 17797 exited due to signal (11)
07-20 15:41:21.577 797-1040/? I/OpenGLRenderer﹕ Initialized EGL, version 1.4
07-20 15:41:21.595 797-1624/? I/ActivityManager﹕ Process com.apophisstudios.dinsaurisland (pid 17797) has died
Answer by Riwels · Dec 16, 2015 at 12:42 PM
Same problem here. I've been trying some stuff and finally found a workaround. In my project it's caused by shaders not being preloaded, so...
Try this:
Open the scene with UI texts.
Go to menu option "Edit/Project settings/Graphics".
On "Shader preloading" hit "Clear" button. "Currently tracked" should switch to 0.
Play the scene in the editor.
Go back to graphics settings. "Currently tracked" should be now >0. Hit "Save to asset" button and save the file.
Increase size by 1 to "Preloaded Shaders" and set your step2 file there.
Save and run.
This should work for simple UI text, using colors and not materials. If you are setting shaders on runtime, I don't know if it will help you. Also if there is text shown with a condition. Try playing the whole proyect and saving shaders then.
Hope it helps to someone else.
Didnt work for me, when I hit clear still some currently tracked stayed
Have converted this to a comment. Please only use the "Your answer" box for answers to the main question, thanks.