Greetings.
We use NGUI for our UI. And we noticed that for any Unity version after 5.3.4, when we make a build, you run the game once and it’s fine, force close it and run it again, sprites are black and there’s no font rendering. Close it/open it up back up again it works, do it again the sprites are gone, etc it just alternates like that.
It doesn’t happen on all phones, only a few. e.g. Samsung S7 Edge and Nexus 6P were busted, but Galaxy S5 had no issues.
Again, building with versions 5.3.4 or lower there are no problems. Anything after that causes issues.
Note that NGUI is up to date.
More info, reading logs from adb, I see some weirdness:
- GLSL link failed, no info log provided
- And some Java exceptions, don’t know if they’re related but:
Bad activity token: android.os.BinderProxy@7510fe2
07-22 14:17:59.084 1747 1771 W ActivityManager: java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.android.server.am.ActivityRecord$Token
07-22 14:17:59.084 1747 1771 W ActivityManager: at com.android.server.am.ActivityRecord.forTokenLocked(ActivityRecord.java:424)
07-22 14:17:59.084 1747 1771 W ActivityManager: at com.android.server.am.ActivityRecord.isInStackLocked(ActivityRecord.java:1121)
07-22 14:17:59.084 1747 1771 W ActivityManager: at com.android.server.am.ActivityRecord.getStackLocked(ActivityRecord.java:1126)
07-22 14:17:59.084 1747 1771 W ActivityManager: at com.android.server.am.ActivityManagerService.getActivityDisplayId(ActivityManagerService.java:8955)
07-22 14:17:59.084 1747 1771 W ActivityManager: at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:2338)
07-22 14:17:59.084 1747 1771 W ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2488)
07-22 14:17:59.084 1747 1771 W ActivityManager: at android.os.Binder.execTransact(Binder.java:453)
And:
android.os.DeadObjectException
07-22 14:38:03.786 1747 6665 W ActivityManager: at android.os.BinderProxy.transactNative(Native Method)
07-22 14:38:03.786 1747 6665 W ActivityManager: at android.os.BinderProxy.transact(Binder.java:503)
07-22 14:38:03.786 1747 6665 W ActivityManager: at android.app.ApplicationThreadProxy.scheduleStopService(ApplicationThreadNative.java:985)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActiveServices.bringDownServiceLocked(ActiveServices.java:1777)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActiveServices.bringDownServiceIfNeededLocked(ActiveServices.java:1687)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActiveServices.stopServiceLocked(ActiveServices.java:477)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActiveServices.stopServiceLocked(ActiveServices.java:500)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActivityManagerService.stopService(ActivityManagerService.java:15804)
07-22 14:38:03.786 1747 6665 W ActivityManager: at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:941)
07-22 14:38:03.786 1747 6665 W ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2488)
07-22 14:38:03.786 1747 6665 W ActivityManager: at android.os.Binder.execTransact(Binder.java:453)
Here’s how the game looks
Any ideas what’s going on? Some NGUI shaders gone wrong or?
Any help or pointers (or references :p) is appreciated!
Thanks.
[EDIT]: Seems like setting the max atlas texture size to 2kx2k fixed it for one of our games. But we have another game that we tried building (same NGUI, same Unity, same texture settings etc) that still shows black textures.