-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Beta: Text and Icons not always showing correctly in dialog #64936
Comments
Hi @DustyLamp, |
Thanks @darshankawar - I've made an update to the original comment |
Hi @DustyLamp, thanks for the code sample. |
Yes - good question @darshankawar. I can reproduce the issue with text sizes 11 or smaller, but I believe I have seen instances of it occurring with different sized texts (see original screenshots) I've edited the code to remove flutter_screen_util plugin. |
Thanks @DustyLamp for the code sample. flutter doctor -v
Since you said, it's intermittent, I'd suggest you keep an eye on it and see if there's any pattern that causes the issue. |
When I say it's intermittent, it's happening every second time that I push the button in my code so it's not rare. It happens more often than not. As for patterns that cause it:
|
I am unable to replicate this issue on latest beta and on the devices I tried, but per OP, it's happening at their end. Will need further analysis on it,so keeping this issue open. |
I'm experiencing something similar. Text/Icon widgets are rarely shown after animations. Happens both on android and ios platforms. As far as i can tell, it affects debug and release builds. Here's some example code:
|
Another important note: This problem appears on physical devices more often than on simulators/emulators. My flutter doctor output:
|
Could you reproduce it with my example code @darshankawar ? |
I reproduced this issue using the sample code from #64936 (comment) It happens reliably on a Moto G4 if I run the app in release mode, hit the back button, and resume the app. The animation will run but the text will not be rendered. Bisected this to google/skia@a5b9860. The text shows if I remove the |
Can you print the values of fInitialMatrix when the problem happens? |
The last fInitialMatrix seen during the animation is:
|
The problem stems from building the initial text blob with a size of
1/650,000. This creates an initial blob with no viewable text. What is the
text size on SkFont when you initially draw it, and what is the text size
on SkFont when you expect it to draw? Can you provide a repro case in c++?
Thanks,
Herb
…On Mon, Sep 21, 2020 at 3:42 PM Jason Simmons ***@***.***> wrote:
The last fInitialMatrix seen during the animation is:
m0=0.000065 m1=0.000000 m2=540.004028
m3=0.000000 m4=0.000065 m5=888.019592
m6=0.000000 m7=0.000000 m8=1.000000
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64936 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANUMHGVSE6KUYJAIYG5DFLSG6UDHANCNFSM4QQGWA4A>
.
|
The SkFont in this example always has font size 14. The 0.000065 value in the matrix happens because the text is wrapped in an animation that applies a scale transform. When the animation works properly, the If I remove the With the I don't have a standalone C++ reproduction. |
If the blob is empty, then try to regenerate it. Using this method caused a slowdown in Skia perf, so we added an extra check to allow some empty blobs through for perf performance. The perf problem was caused by SKPs generate empty blobs because of font mismatches. Flutter has shown that scaling from very small to normal size is not correctly handled by the existing check. This CL favors correctness over optimizing empty text blob and always regenerates empty blobs. flutter/flutter#64936 Change-Id: Ib18ecb684b0af5cf6dce274b6dc09a9c61b17c77 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319031 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
The change was reverted in Skia and rolled into the engine. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Text and icons do not show correctly about 50% of the time in all of my dialogs, but only on Flutter Beta Channel.
Issues are intermittent and include:
There's nothing else that's problematic - all sizes and styling look fine.
It's a relatively new issue - I haven't seen it before and I generally stick to the Beta Channel. I haven't been able to reproduce it on Stable.
There's nothing indicating an issue and there's no difference in the console between Beta and Stable.
Beta:
Stable:
UPDATE
Here's the output from
flutter doctor -v
:I'm only seeing the issue on Android currently - I haven't tested it yet on IOS, but will post the results as soon as I have the ability to.
I'm seeing the issue on Samsung Galaxy S10e. I've had someone tell me that there is a similar problem (screen is blank) that extends beyond Dialogs on Pixel 4 XL. Reverting back to standard also fixed their issue.
I'm using ScreenUtil to set the size of the Text Widget's TextStyle like so:
Perhaps it's a race condition between the Dialog opening time and calculating the text size?
This reproduces it on the Samsung Galaxy S10e:
And here are screenshots of it acting up with the code above:
expected
nothing showing
Topmost Text not showing
The text was updated successfully, but these errors were encountered: