-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially disappear of text fields after restore game from background on Android #1054
Comments
Hey there! Hm ... this seems similar to #1012 — which ought to have been fixed with AIR 29. Which AIR version are you using? |
AIR31 I have no "cropped" textures. But some TextFields are disappeared without any errors. It is hapens only after restore game on Android. Seems it is rendering problems. I use standart AssetManager and latest Starling 2.3 |
Hm, that's really weird. Since it happens when the game is restored from background, you're probably seeing a context restore – and TextFields normally restore themselves automatically after a context loss. Here are a few questions that might help us get to the root of the issue:
|
I think it is random on different scenes.
no
What is the right moment for this call?
Yes I have plan to upgrade to AIR32
Ok, i try it. But I want notice, that I saw this bug early with other AIR and Starling versions.
EN/RU/DE Sometimes some images (from atlases) may disapear too, but always whole images (without crop). I is like disappear few layers on display list hierarchy. Other images from same atlas present on scene. |
Thanks for the additional information! Hm, the problem in the video does look severe — and that's either a different problem, or it was simply a coincidence that we saw the original problem only on TextFields. What is the right moment for this call? Anytime, really. Just let the game dispose the context e.g. when you hit a specific button, and then check out if this has the same effect. Otherwise, the first thing to do would be to upgrade to the latest AIR and Starling versions. If the problem persists, we'll dig deeper. Fingers crossed! |
The same problems with latest AIR and Starling... But! |
Hm, that's an interesting find, yes — one would expect those files to have the same size. But TBH I don't know the internals of how this file is generated; it could also be a red herring. Could you try if handling a context loss works correctly? (Via the |
context.dispose() works correctly with any build |
I don't suppose you have any new findings as to when the issue pops up? Here's one thing I just thought of - it might be totally unrelated, but it's a quick test, so we should check it out. There is one rare bug in Starling's render cache that I've seen reported a few times, but could never reproduce (and thus: fix). To rule that out, we should try if the problem still happens when you completely deactivate the render cache. To disable the render cache, override the "render" method in your game's root class (the one you're passing to the Starling constructor) like this: override public function render(painter:Painter):void
{
painter.excludeFromCache(this);
painter.cacheEnabled = false;
super.render(painter);
painter.cacheEnabled = true;
} It's worth a try! |
I have no ideas about it:
I use ttf font:
[Embed(source="../fonts/Exo2Bold.ttf", embedAsCFF="false", fontFamily="Exo 2 Bold")]
private static const ExoBold:Class;
Can you explain my mistake?
The text was updated successfully, but these errors were encountered: