Hey everyone, I’m getting close to launching my game into beta testing on the App Store but I am plagued with a crash on start about 60-70% of the time my game is launched. Below is an image of the stack:
I’m fairly new to Unity and iOS development/XCode so I cant really tell if this is a Unity issue or not. This crash is right after my splash screen and it happens a good majority of the time the app is launched from the device. Any input on this would be greatly appreciated as its holding up the release of my game.
Thanks!
So after a bit of experimentation and re-reading the stack trace it became apparent that it was crashing because of a material, so I looked down to see that SetupSun was being called. I checked out my sun flare setup (which is the spacesun from Unity’s Lens Flares asset store product) and seeing that it was imported as an Advanced Texture got me thinking that this could be causing the crash.
As soon as I unlinked the flare from the light source and rebuilt, the crash hasn’t happened. Here are the import settings for the spacesun flare texture:
If anyone has any suggestions as to what Unity doesn’t like about this, let me know as this is a beautiful lense flare effect.
hm, looking through code it seems we shouldnt touch flare/halo/whatever there. Can you please create small repro case and bug report? Drop case number here.
Case # is 706236. I re-enabled Metal as a rendering API and changed the texture from “Advanced” to “Texture” and it seems to have fixed the crash.
Update: It seems that this didn’t solve the crash, it just made it happen less often. I tried disabling Metal again and the game launched 10 of 10 times in a row so it seems this in fact is Metal specific hence line 3 of the stack trace.
That one is pretty weird and looks like some crazy issue in compiler vs ios-runtime vs our code. I’m digging into it but for now disable metal indeed.
P.S. i would recommend to upgrade to 5.1, as 5.0 will not get any fixes
P.P.S. “close to launching my game into beta testing on the App Store” - switch to il2cpp then, mono is 32bits only - so you will be rejected most likely
Thanks Alexey! I have upgraded to 5.1.1f1 since that case was filed and this issue has persisted. I have been building in il2cpp for app store submissions and mono for quick tests and the crash results are the same for both.
ah, sure - i reproed on 5.2 + il2cpp no worries
i was just giving heads up on possible issues i saw
I appreciate it Alexey, keep me updated if you find anything 