Serious bug with Unity 4 (Amazon refusing our apps because of it)

Hi,

Currently our apps are being refused by Amazon after we switched to Unity 4. We are using custom loaded textures (Texture2D), the following happens 100% of the time. Is anyone else experiencing this? The bug report I submitted to Unity:

  1. On Android Texture2D textures will become black on the following devices so far. Texture2D format is 2048x2048 RGBA32 and have Apply(false,true) called to make them unreadable:

Samsung Galaxy S3
Samsung Galaxy S4
HTC Evo 4G
LG Nitro

  1. Note: this problem ONLY and ONLY happens when EXACTLY doing the steps below:
  • Copy APK to device
  • Install APK
  • Click Open
  • Click Home
  • Go back to app

Again: this problem only happens after these steps, if you kill the app and then start it and click home and back to the app it will not happen anymore.

Do you mind filing a proper bug report and attaching a repro case so we can investigate the issue?

As mentioned I reported the bug in Unity, I will resubmit one with an example project attached. Also we tried Unity 3.5 where it also happens. We pinpointed the problem to the Texture2D.Apply(false,true) call. When we remove it everything is fine. Unfortunately this will make our app eat ungodly amounts of memory

Thanks! Please post the case number in this thread when you are done submitting the report.

Hi,

Thanks for your quick response! The case number is: Case 544463

well, i didnt look into bug case, but still

this will remove system-memory copy of the texture

if this kills gl context - there are no means to reload textures.
another problem is - gl context should be preserved, but oh well
just a heads up

EDIT: oh i should have read the last sentence. Can you also try adding
Handheld.ClearShaderCache();
to, say, some Start() method?
some details:
http://forum.unity3d.com/threads/178534-bug-of-unity-4-1-2-f2-built-in-shader-and-separate-shader-work-different-on-android
though i’m looking at it no worries