-
Notifications
You must be signed in to change notification settings - Fork 29.4k
[CP-stable]fix: macOS Mojave Crash on Flutter Desktop Startup #172602
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
[CP-stable]fix: macOS Mojave Crash on Flutter Desktop Startup #172602
Conversation
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Overview This PR fixes a crash that occurs when launching Flutter desktop applications on macOS Mojave (10.14). Changes Made • Added conditional checks to ensure the code using the `hasUnifiedMemory` API only runs on macOS 10.15 or later, since `hasUnifiedMemory` is only supported starting from macOS 10.15. • Ensured that the fix maintains compatibility with newer macOS versions without affecting existing functionality. Testing • Verified that Flutter desktop apps launch and run normally on both macOS Mojave and later macOS versions. • Confirmed no side effects by running default Flutter desktop sample apps. Additional Notes • https://developer.apple.com/documentation/metal/mtldevice/hasunifiedmemory This PR aims to improve the stability of Flutter desktop applications on macOS Mojave. Thank you for your review and consideration. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md Co-authored-by: Kim Ki Cheol <kim.kicheol@sk.com>
|
@jason-simmons please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
|
I have pinged @jtmcdole to approve since this cherry pick does not have a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"CI-tested versions" is 13+, so there's no real option to test this other than locally. Approved.
2350e38
into
flutter:flutter-3.32-candidate.0
Issue Link:
#172282 (comment)
Changelog Description:
Do not call an API that was introduced in macOS 10.15 on versions before 10.15.
Impact Description:
Apps will crash on macOS 10.14 (which is a supported platform according to https://docs.flutter.dev/reference/supported-platforms)
Workaround:
Is there a workaround for this issue?
No
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
(Tests that run on current versions of macOS will confirm that this PR does not cause regressions. But I don't know if we have any tests that run on macOS 10.14)
Validation Steps:
What are the steps to validate that this fix works?
Run a Flutter app on macOS Mojave (10.14)