-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Simulator Flickering Issue with Latest Flutter and iOS Versions #148660
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
Thanks for the report @sinnoorc
|
@darshankawar Thank you for the assistance! |
@darshankawar [IMPORTANT:flutter/shell/common/shell.cc(454)] [Action Required] The application opted out of Impeller by either using the --no-enable-impeller flag or FLTEnableImpeller=false plist flag. This option is going to go away in an upcoming Flutter release. Remove the explicit opt-out. If you need to opt-out, report a bug describing the issue.
[IMPORTANT:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalSkia.mm(66)] Using the Skia rendering backend (Metal). |
I can reproduce this issue on iOS 17.4 emulator (haven't checked this on a physical device as I don't have one). I narrowed this down a bit and see the issue seems to appear with AnimatedBuilder which is used internally inside CircularProgressIndicator. The issue occurs on the latest stable 3.22.0 and master channel whilst it works normally on the previous 3.19.6. This seems to only happen on iOS as I don't see the issue on Android (enabled Impeller).
flutter doctor -v (stable and master)[✓] Flutter (Channel stable, 3.22.0, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.0 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f68f (11 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.208
[✓] Network resources
• All expected network resources are available.
• No issues found! [!] Flutter (Channel master, 3.22.0-39.0.pre.1, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.0-39.0.pre.1 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 165e535474 (3 hours ago), 2024-05-20 16:52:15 -0700
• Engine revision c2ef01f6f1
• Dart version 3.5.0 (build 3.5.0-172.0.dev)
• DevTools version 2.36.0-dev.10
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.61
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category. |
When I put up a showdialog and type into a text field, i see all manner of screen artifacts including the widgets in the screen behind disappearing. When i disabled impeller per the suggestion above, these problems cease. I am using ipad simulator with 17.2 and flutter 3.22. |
I tested with 3.22 stable as well and I don't see the flickering on the iPhone 15 Pro iOS 17.5 simulator. |
I do see it on stable 3.22.0, when running with Impeller only. I am using XCode *: gaaclarke's note: Xcode 15.4 like above. |
Okay, here's what we know:
Here's the next question: For the people that are seeing it, what kind of Mac are you using. I have an M1 Max. This is sounding like an Apple bug unfortunately. Someone that can reproduce it should file an apple bug and try downgrading xcode to 15.3 for now. I'm unable to reproduce the problem so I can't test if that is a valid workaround. If someone does verify that, could they post that info here please for others? |
I am running on a Mac with an Intel chip. |
That's what I was afraid of. I don't know how successful you will be at getting Apple to address this since it has stopped selling intel macs a while ago. I'm going to close this since there is nothing we can do from flutter's side to address this. The workaround is to test on device if you have an intel mac. |
Reopening this so the bot doesn't lock this in case more information comes in. |
Reproduced this on an Intel Mac Mini. Bisected it to flutter/engine@431d64d |
So this is likely a problem with the storage mode + flush implementation for simulators. I'm not sure what kind of buffer storage mode we're getting on the intel simulators. I don't know if FML_OS_IOS is enabled for simuators as well, but if not then the DeviceBuffer::Flush implementation might be broken: |
|
Okay then that code is wrong, we need to execute the flush for sim targets |
In the scenario where this happens it looks like Tried adding some logging to Each I was able to get this to run smoothly on the Intel Mac Mini iOS simulator with this patch:
|
I faced the issue on an an Intel chip Mac. |
🙋 Another Intel mac user with the issue |
See also: flutter/flutter#148660 Intel iOS simulators do not seem to enforce any backpressure on drawable acquisition. Fix this via blocking on completion in the surface_mtl.
…r#53073) See also: flutter/flutter#148660 Intel iOS simulators do not seem to enforce any backpressure on drawable acquisition. Fix this via blocking on completion in the surface_mtl.
Cherry pick pending at #149700 |
another mac intel core i5 user here facing same problem after upgrading flutter sdk also xcode 15.4 and emulator to 17.5 |
how to fix this issue now ?? |
Steps to reproduce
After updating Flutter to version 3.22 and iOS to version 17.5, I've encountered a bug in the iOS simulator. The simulator screen flickers whenever an animation occurs, such as when a loading indicator is displayed. This issue did not exist before the updates.
Update Flutter and iOS:
Open a Flutter Project:
Add an Animation:
Run the Project in the iOS Simulator:
flutter run
.Observe the Issue:
Environment
Expected results
The iOS simulator should run smoothly without any screen flickering during animations. For example, when a loading indicator is displayed, the animation should appear seamlessly without any visual disturbances. The application should function as intended, providing a stable and clear user experience.
Actual results
After updating Flutter to version 3.22 and iOS to version 17.5, the iOS simulator exhibits screen flickering whenever an animation occurs. For example, when a loading indicator is displayed, the screen flickers continuously, disrupting the animation and overall user experience. This issue was not present before the updates.
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-05-20.at.11.44.16.mp4
Logs
Logs
https://pastebin.com/BjRKbn8J
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: