mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? There does not appear to be a dedicated issue. The issue description can be found in the PR description: https://github.com/flutter/flutter/pull/176329 The PR fixes a macOS text input crash caused by down-casting the string argument from `Any` to a `NSString`, from [this API](https://developer.apple.com/documentation/appkit/nstextinputclient/inserttext(_:replacementrange:)#parameters). The documentation says it can either be a `NSString` or `NSAttributedString` ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples > Fixes a crash on macOS when the input method (or other services) inserts a `NSAttributedString` instead of `NSString` into a text field. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) App crashes on macOS when interacting with certain IMEs or other system services, if they decided to use `NSAttributedString` instead of `NSString`. It affects production apps. ### Workaround: Is there a workaround for this issue? None. Users or app developers have little control over what the IME / services decide to do. The problematic code path in the engine directly interacts with system services so app developer can't workaround that. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? The PR description does not have repro steps. @p1318k could you add the steps to trigger the bug here?
Flutter Engine
Setting up the Engine development environment
See here
gclient bootstrap
Flutter engine uses gclient to manage dependencies.
If you've already cloned the flutter repository: