Skip to content

Crash happens when delete characters of a unicode string, such as "🍷hello🎤world🤗" #332

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

Closed
zhileichen opened this issue Dec 31, 2019 · 1 comment · Fixed by #338
Assignees

Comments

@zhileichen
Copy link

zhileichen commented Dec 31, 2019

Environment

Windows 10
go-flutter v0.34.0

Step to Repreduce

  1. Copy the sample string "🍷hello🎤world🤗" into a TextField
  2. Click Backspace key in the keyboard to delete any character
  3. Then the crash happens

Go Error

runtime.boundsError
runtime error: slice bounds out of range [4:3]

Go Stacktrace

textinput-model.go in (*textinputPlugin).addChar at line 27
textinput.go in (*textinputPlugin).glfwCharCallback at line 137
input.go in goCharCB at line 295
_cgo_gotypes.go in _cgoexpwrap_173d98a40ae9_goCharCB at line 2120
_cgo_gotypes.go in _Cfunc_glfwWaitEventsTimeout at line 1985
window.go in WaitEventsTimeout at line 823
application.go in (*Application).Run.func11 at line 331
event-loop.go in (*EventLoop).WaitForEvents at line 124
application.go in (*Application).Run at line 330
application.go in Run at line 27
main.go in main at line 53
@pchampio pchampio added bug Something isn't working embedder Issue concerns the embedder package labels Jan 2, 2020
@pchampio
Copy link
Member

pchampio commented Jan 14, 2020

Dart inaccuracy calculate the RuneLen in the presence of those characters. The Dart lang bug dart-lang/sdk#28404 has been filed to address this in Dart. RuneLen caculation
Not a go-flutter issue. Tagging as wontfix.

Btw, are you seeing the emoji on your app? (on mine it just shows up as a invalid character ▯)

@pchampio pchampio added wontfix This will not be worked on and removed bug Something isn't working embedder Issue concerns the embedder package labels Jan 14, 2020
@pchampio pchampio self-assigned this Jan 15, 2020
@pchampio pchampio removed the wontfix This will not be worked on label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants