Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Black sprites and invisible fonts after 5.3.4? (using NGUI)

Discussion in 'Android' started by vexe, Jul 22, 2016.

  1. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    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:

    Code (CSharp):
    1. Bad activity token: android.os.BinderProxy@7510fe2
    2.  
    3. 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
    4.  
    5. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at com.android.server.am.ActivityRecord.forTokenLocked(ActivityRecord.java:424)
    6.  
    7. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at com.android.server.am.ActivityRecord.isInStackLocked(ActivityRecord.java:1121)
    8.  
    9. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at com.android.server.am.ActivityRecord.getStackLocked(ActivityRecord.java:1126)
    10.  
    11. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at com.android.server.am.ActivityManagerService.getActivityDisplayId(ActivityManagerService.java:8955)
    12.  
    13. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:2338)
    14.  
    15. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2488)
    16.  
    17. 07-22 14:17:59.084  1747  1771 W ActivityManager:     at android.os.Binder.execTransact(Binder.java:453)
    And:

    Code (CSharp):
    1. android.os.DeadObjectException
    2.  
    3. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at android.os.BinderProxy.transactNative(Native Method)
    4.  
    5. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at android.os.BinderProxy.transact(Binder.java:503)
    6.  
    7. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at android.app.ApplicationThreadProxy.scheduleStopService(ApplicationThreadNative.java:985)
    8.  
    9. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActiveServices.bringDownServiceLocked(ActiveServices.java:1777)
    10.  
    11. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActiveServices.bringDownServiceIfNeededLocked(ActiveServices.java:1687)
    12.  
    13. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActiveServices.stopServiceLocked(ActiveServices.java:477)
    14.  
    15. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActiveServices.stopServiceLocked(ActiveServices.java:500)
    16.  
    17. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActivityManagerService.stopService(ActivityManagerService.java:15804)
    18.  
    19. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:941)
    20.  
    21. 07-22 14:38:03.786  1747  6665 W ActivityManager:     at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2488)
    22.  
    23. 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.
     
    Last edited: Jul 22, 2016
  2. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    17
    Did you resolve problem with black sprites?

    I have similar problem happening only iPhone 6s Plus. One of the NGUI atlas texture is going black. I had it 4k x 2k but I was able to make it 2k x 2k but problem still exists. Not always. It's really hard to find the cause, because it's happening rarely.

    I'm using latest NGUI 3.10.1 and Unity 5.4.0p2.
     
  3. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    Not really, we just built with Unity 5.3.4. You could try asking for help in NGUI forums maybe.