Skip to content
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

flutter page flickering #206

Open
OnClickListener2048 opened this issue Jan 18, 2025 · 3 comments
Open

flutter page flickering #206

OnClickListener2048 opened this issue Jan 18, 2025 · 3 comments

Comments

@OnClickListener2048
Copy link

Sorry for creating a issue which is irrelevant to this repo, but this is the only way i can contact you.
I've been encountered a really tricky problem with flutter, there are few videos that shows the problem are

Image
https://github.com/user-attachments/assets/9ea31592-72b6-4886-91fa-8aae4818d918

it happens sometimes but not always, i've tried that when this flickering shows up i just call setState,and it will go away ,but when i called WidgetsBinding.instance.drawFrame(), it doesn't, since you are a flutter engine developer, can you help me to find out what problem i am facing?

thank you !

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jan 18, 2025

Hi, without more information it is not very easy to determine the root cause. Maybe one way is to firstly print out as much debug information as possible. For example, what is the widget tree? (is the flickering part a single widget or not? I guess no but maybe double check, e.g. is there a hidden overlay there that shows up) Also maybe try to gather more such videos to find patterns (e.g. is the flicker region has some common pattern or is it really random?) Also, if it can be reduced to a minimal reproducible sample then it may be helpful.

@OnClickListener2048
Copy link
Author

Hi, without more information it is not very easy to determine the root cause. Maybe one way is to firstly print out as much debug information as possible. For example, what is the widget tree? (is the flickering part a single widget or not? I guess no but maybe double check, e.g. is there a hidden overlay there that shows up) Also maybe try to gather more such videos to find patterns (e.g. is the flicker region has some common pattern or is it really random?) Also, if it can be reduced to a minimal reproducible sample then it may be helpful.

f7e8066b3eba1a146397ee8c66bf343e.mp4

I don't think the flickering part is a widget that invisible or a overlay that hidden in somewhere
what happens in this video happens a lots times and i can' find a pattern about it and when it flickering, the build wasn't called and addPostFrameCallback wasn't called, it looks like the engine mixed up one or two frames, and render it twisted, maybe, do you think could it be that reason?

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jan 19, 2025

Yes I agree that may be somehow an engine issue... More brainstorms:

  • Upgrade to latest flutter version since it may contain fixes (which are you using currently btw?)
  • Try to disable Impeller rendering engine (or enable it, if you have not), to check whether it only happens in one engine
  • Try to enable some logging in flutter, e.g. debugPrintBeginFrameBanner, debugPrintEndFrameBanner (see https://docs.flutter.dev/testing/code-debugging for details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants