singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 839 forks source link

App crash without throwing error when insert serveral utf-8 emoji characters #2386

Closed Danny-Hoang closed 2 days ago

Danny-Hoang commented 3 days ago

Is there an existing issue for this?

Flutter Quill version

10.8.2

Steps to reproduce

I just have a quill editor with basic setup, and some button to insert emoji to the editor on clicked. When click at very low speed, it seems ok. But, when insert emoji at normal speed, the app crashed after serveral emojis inserted. Emoji characters is just utf-8 emoji.

Expected results

The app does not crashed when insert emoji characters.

Actual results

The app crashed when insert emoji characters.

Additional Context

Screenshots / Video demonstration [Upload media here]
Logs ```console [Paste your logs here] ```
EchoEllet commented 3 days ago

Can you share a video, the platform you're running (likely Android), and the device name.

App crashes are usually platform specific and will need more details, including minimal reproducible code snippet.

Danny-Hoang commented 3 days ago

I did fixed it by when insert an emoji I insert an "empty space" next to it: Sample code: onSelect: (emoji) { insertCharacterAtCursor( "$emoji\u200B"); // \u200B is empty space character } But you can investigate why. Because this is a hacky way to resolve the issue.

Danny-Hoang commented 3 days ago

I develop my flutter app on macbook, and the bug is on IOS, flutter version is 3.24.

EchoEllet commented 3 days ago

Could you share the console log or the error output that occurs on the crash?

Danny-Hoang commented 2 days ago

Hello. In debug mode, the app become unresponse and does not throw any error even in try catch. In release mode, the app close unexpectedly.

EchoEllet commented 2 days ago

We don’t have enough details to investigate and resolve this issue. Closing it for now, but feel free to open a new issue with more information.