Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Scaleform HUD textures disappear and are replaced with black boxes

4 REPLIES 4
Reply
Message 1 of 5
ReticentCouch
1095 Views, 4 Replies

Scaleform HUD textures disappear and are replaced with black boxes

What version of the Scaleform SDK are you using? (4.1.19, etc.) for Android? for iOS? Eval? Licensed?

 

Scaleform 4.2 Unity SDK

 

Do you have the latest patch installed?

 

Yes

 

What is your development platform? Windows or Mac? OS version? 64 or 32 bit?

 

Windows 7

 

What version of Unity are you on? (Note: Scaleform only support Unity Pro)

 

Unity Pro 4.1.5f1

 

What platform are you developing for? PC? Android? iOS?

 

Android

 

What hardware are you using and testing on?

 

Nexus 4 phone

 

What version of Android or iOS is on your device?

 

Android 4.2.2

 

Who manufactured your device?

 

Google

 

What model # is your device? (Android-> Settings/About...)

 

Nexus 4

 

What GPU is your device?

 

Adreno 320 single - core GPU

 

Who is the carrier of your device?

 

n/a

 

Can you provide sample files that illustrate your bug/issue?

 

Working on it...currently only occurs in a full build of our game

 

Can you provide log files?

 

There is no crash or any information that appears in logs.

 

Can you provide Debug output from Unity’s Editor?

 

There is no crash or any information that appears in logs.

 

Description:

 

The issue I'm having seems very similar to this post:

 

http://forums.autodesk.com/t5/Scaleform-Unity-Development/SOLVED-Render-errors-texture-corruption/m-...

 

We've used Scaleform to prototype a fairly simple HUD for our game. After a certain period of time playing the game (generally after about 3 minutes), parts of our HUD disappear and are replaced with black rectangles. It never happens immediately; it always requires a bit of soak time in the game. This is 100% repeatable and reproducible. I've attached two "before" and "after" images of the "Cash blade" portion of our HUD. We're not using RTT or anything complicated, just simple Flash movieclips containing PNG images and some dynamic text fields. The problem only seems to occur when running on an Android device (I'm mentioned the Nexus 4 here, but it happens on other devices as well), but it never appears when running in the Unity editor on Windows.

 

Through an Adreno debugging setup, we've been able to confirm that the root cause of the problem is that the textures Scaleform relies on are being deleted from memory. Using the Cash blade as an example, early on in the game when it is drawing properly, we can confirm it has a given texture ID, say 588, but later in the game (once the Cash blade has been replaced with a black rectangle), no texture with the given ID exists in memory any longer. It seems like during the course of the application's run, something is deleting the texture from memory.

 

I've seen mention in the other post of over-using texture memory in Scaleform being the culprit, but that seems unlikely in this scenario. Our HUD is quite minimal. I've run the application through AMP to verify that there are no memory leaks and the texture memory usage is quite low. We have noticed that creating/destroying or enabling/disabling other cameras in the scene (other cameras; not the Scaleform camera) seems to exacerbate the problem.

 

The post i referenced above is marked as SOLVED, but many other people still seem to have this issue. Is there a known solution? It's becoming quite frustrating. Once one texture has disappeared, more and more start disappearing over time and the entire Scaleform portion of our game becomes unusable. My team is considering moving away from Scaleform in favor of another UI solution if we can't get this figured out.

 

Please let me know if I can provide any further information. I'll continue to work on trying to get a small, reproducible demo to illustrate the issue. Thanks for your time and help!

 

4 REPLIES 4
Message 2 of 5

Based on a suggestion, I tried adding this to the "Start()" method of SFCamera.cs in the Unity plugin:

 

for (int i = 0; i < 1000; ++i)
{
RenderTexture tmp = RenderTexture.GetTemporary(256, 256, 0, RenderTextureFormat.ARGB32);
RenderTexture.ReleaseTemporary(tmp);
RenderTexture.DestroyImmediate(tmp);
}

 

And it seems to clear up the deleted texture issue though I'm not sure I'd call it a "fix" so much as a workaround.

Message 3 of 5
Anonymous
in reply to: ReticentCouch

I had the problem too. and the problem should be happened while switch scene times! But I cann't sovle the problem. If you sovle it, please let me known. thanks.

Message 4 of 5
MatthewDoyleArt
in reply to: Anonymous

If you can provide sample test case that shows your issue, I can ask the support team to investiage. Thanks!

_______________________________________________________________________________
Check out my LIVE Twitch Feed: www.twitch.tv/matthewdoyle
...for live workflows using Mudbox, Maya LT, MotionBuilder, Sketchbook, 3ds Max and more.
1 PM - 6 PM CST - Monday - Friday
Message 5 of 5
Anonymous
in reply to: ReticentCouch

I can provide a sample.After switch sence times.The issue will be appear. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report