-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[iOS 16] Flutter apps crash when emojis and text are combined. #111494
Comments
I have not updated my xcode so unfortunately can't run iOS 16 simulators right now. Could you attach the stack trace of the crash? |
I have a couple of Flutter apps installed on my iPhone which now has iOS 16 installed, and I can confirm that they do crash when I reproduce the steps above. |
Issue is reproducible on recordingSimulator.Screen.Recording.-.iPhone.14.Pro.-.2022-09-14.at.07.20.55.mp4code sampleimport 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
title: const Text('Korean Emoji Crash'),
),
body: const Center(child: TextField()),
),
);
}
} crash report
flutter doctor -v
|
The same crash happens in English with Custom keyboard apps, such as Gboard. Steps to reproduce
|
Hi @naodroid, this may be a different issue. Can you file a new issue and provide the crash log along with any other relevant information? You can follow https://developer.apple.com/documentation/xcode/acquiring-crash-reports-and-diagnostic-logs to retrieve it from the device. |
Hello @danagbemava-nc, thank you for your reply. |
Alternate steps to reproduce this issue can be found in #111494 (comment) |
|
or maybe @chunhtai? |
When we have a fix this will be hotfix worthy. |
The keyboard seems to be doing very strange things. When I tried the repro, it deleted everything in the text field and inserted a high surrogate. That's why encoding fails. |
This looks like a UIKit bug. When one types "👍👍ㅇ" and then "ㅓ", the keyboard turns the syllable into its precomposed form "어" by deleting "ㅇ" and then inserting "어". I think the keyboard manager should have called movq 0x10bc3fa(%rip), %rsi ; "_rangeOfBackwardDeletionClusterAtIndex:"
xorl %r12d, %r12d
movq %r15, %rdi
xorl %edx, %edx ;<- index is always 0
callq *0xdcf6e4(%rip) ; (void *)0x00007ff80002d6c0: objc_msgSend Both calls return the same value ( |
The reason it works in |
Thanks for your hard work to fix this. Just for your information, unfortunately this issue is reproduced also in iOS 16.1 beta (20B504d) 😔 |
@LongCatIsLooong are there any gross hacks/using the private APIs we can do to work around this? If I can get a stand-alone non-Flutter example that reproduces I'll file the bug with Apple. |
Thank you! I'll try to make one but since it's a full
I haven't identified any. Changing |
Note: this issue doesn't happen on MacOS. |
See also flutter/engine#34508 |
@jmagman Is this fixing the issue? Any info on the timeline to get it over to stable? Seeing this is crashing every flutter app currently in production, should this be bumped in priority? |
There's already a PR out for review at flutter/engine#36295 |
Hello. Thanks a lot for your hard work on maintenance of Flutter. I know this bug is being addressed but could we make this merged a bit faster? 🙏 This issue was raised 21 days ago and my users have been reporting the issue everyday. Sorry I have to bother asking while you're already on it. |
The fix is available on the master channel. Can anyone confirm it now works there? If so, a stable cherry-pick request should be submitted, @cyanglaz. |
Never mind, spoke too soon, this hasn't yet rolled, should in a few hours though. |
This is rolled into flutter/master with commit 145904f |
@cyanglaz Thanks! 👍 Is a new stable version going to be released with the change? Or should I cherry-pick the change on my stable branch? |
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 |
Steps to Reproduce
Expected results:
It should not crash
Actual results:
It crashes 100%
Video
https://drive.google.com/file/d/1x_ZtqbjzzUpSwXTYuN7KQbEbKtfEaEf_/view?usp=sharing
Description
The text was updated successfully, but these errors were encountered: