call to OpenGL ES API with no current context: problem loading texture in unity 5.1.1f1

Hi

I am facing a major problem with unity 5.1.1f1.

FOR ANDROID ONLY :
When the app is just launched and minimised within the splash screen, then resumed from recent apps, all the textures become null which appears blank after this. The text appears as Blank boxes. Please find the two screenshots attached : 1. When the app is in normal state without any issue ; 2. The screenshot of the application depicting the issue.

Please provide a solution ASAP. This is creating a lot of issues.

Thanks in advance.

Hello! I have a work around for this. Basically I think the context is lost when you background the app and it’s not restored quickly enough on resume so the shader failed to load (and it seems you can’t reload it).

If there is any reference to this shader when the scene loads while in this state you’ll have problems.

My work around was to wait until the end of a frame after the application had loaded (it seems the context is restored sometime at the end of the frame).

I do think this is a Unity 5 bug (as it didn’t happen in Unity 4).

I hope this helps someone!