Nexus 4 GUI sometimes renders font incorrectly and App Crashes on Quit

Hi everyone.

I posted on Unity Answers a few days ago and I’m still having the same problem.

tl;dr
Take a look at the two pictures in the link. They are the first and second time I opened the Options menu. Notice how the light blue fill is missing from most of the letters in the second image.

Since then, I’ve changed the menu system to use different scenes as explained in my previous post. The bug no longer occurs in the menus, but it still occurs in the game. The first time I play a level, everything is fine. But once I finish a level and play again, the text in the HUD starts screwing up in a similar manner to what I showed previously, except that instead of not rendering specific characters, it seems to be rendering the wrong places on the font texture for each of them.

Here are some screenshots. The first, second and third time I finished a level. This is with my outlining code removed so it only renders the base font.

Everything I listed under “Notes on the Bug” in my previous post still applies.

While nothing appears in the log when the bug itself occurs, when the App starts up, the following log message appears many times (like 30+ in a row).
Tag: Adreno200-EGL
Text: eglGetConfigAttrib:491: EGL_BAD_ATTRIBUTE
This still happens if I build the project with only a single empty scene containing a camera, so I suspect it is something between Unity and my Nexus 4 rather than anything to do with my use of Unity.

I tried googling parts of the above message and found someone claiming it had something to do with shaders, but I tried replacing all of the shaders in my game with unity default shaders and the message still appeared (and my bug still happened).

Also, about 1 in 10 times that I close my game, it crashes the entire phone and I have to hold the power button to turn it off. It simply freezes somewhere between the last frame Unity rendered, a black screen and transitioning back into the launcher.

Does anyone have any ideas what might be causing or how to fix these problems?

Well, I’m everything but an Unity expert (yet :slight_smile: ) but the random phone crashes are interesting.
From my experience with programming in general, when runtime issues that don’t happen all the time but randomly occur, it’s always good to check how you use your threads. Maybe race-conditions are the problem.

Not sure in your case, but maybe worth looking into.

Unity doesn’t use threads for any of its stuff and I’m not using any in my code.

Good idea though.

Have you access to try it on other Android-Smartphones?
If it only happens on your Nexus 4 it might be a bug within that version of Android or a messed up installation rather than your game.

Neither the crash nor the GUI bug happen on my brothers S3 and I should be able to test on my other brother’s Galaxy Nexus later today.

I’ve now tested on a Galaxy Nexus. It doesn’t crash or have the GUI bug.