Missing letters and garbaged font on iOS

I’m occasionally getting missing upper case letters and garbaged text on iOS with the new Unity UI. The issue is not deterministic so I don’t have a decent repro, but it occurs often enough to be disturbing.

Sometimes only some capital letters are missing. Rarely all texts go wild, as if the texture coordinates for the letters were off and the displayed letters contained parts of different letters instead of complete letters. No screenshot available, sorry.

I’ve found that calling RenderTexture.GetTemporary and releasing it immediately fixes the issue and the garbaged texts return to normal.

I’ve had some other issues with RenderTextures too - a newly created RenderTexture would occasionally break within 1 sec after creation and rendering on it didn’t change its contents. XCode would log opengl error code 0x0506 (meaning GL_INVALID_FRAMEBUFFER_OPERATION) whenever attempting to render on the RenderTexture.

This issue was resolved by changing Destroy(renderTexture) calls to DestroyImmediate(renderTexture).

This leaves me wondering if the internal font renderer in unity suffers from the same Destroy-vs-DestroyImmediate bug. None of the issues occur on desktop, only on iOS. I use il2cpp for builds.

Font used is Arial. Also font awesome is used in the same project but haven’t observed any issues with it.

I’m using Unity 4.6.7f1 and iPad Mini Retina.

Has other users experienced this issue? Any ideas for a workaround?

I am absolutely seeing this exact same thing, and only for the past month worth of builds or so on iOS.

However, I’m using OnGUI() and seeing this, so perhaps its a problem in the underlying font rasterizer.

I found that to aggravate it you can put a bunch of different-sized letters on the screen at once. The errors I see are not persistent but rather transient when the objects are first displayed, then they “settled down” to look correct, at least in all the cases I’ve tried.

Ah, and I’m using Unity 4.6.5f1 in IL2CPP mode and running on an iOS 8.3 iPad Air.