Typing Chinese characters in widget.Entry and perform undo/redo crashes the app. #5001
Closed
2 tasks done
Labels
unverified
A bug that has been reported but not verified
Milestone
Checklist
Describe the bug
widget.Entry undo/redo is not compatiable with Chinese characters. Undo/Redo crashes the app when dealing with multiple Chinese characters.
How to reproduce
//to crash the app
Screenshots
Example code
Create text entry widget, type in Chinese characters, press ctrl + z, ctrl + y to perform undo and redo.
Fyne version
2.5.0
Go compiler version
1.22
Operating system and version
Windows 10
Additional Information
At: home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/driver_desktop.go:171
panic: runtime error: slice bounds out of range [4:2]
goroutine 11 [running]:
fyne.io/fyne/v2/widget.(*entryModifyAction).sub(...)
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:2316
fyne.io/fyne/v2/widget.(*entryModifyAction).Undo(0xc000f55ea0?, {0xc0053aadbe?, 0x7ff6a4a23872?})
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:2297 +0x90
fyne.io/fyne/v2/widget.(*entryUndoStack).Undo(0xc000d7fc08?, {0xc0053aadbe?, 0x7f0000c000f55ed8?})
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:2378 +0x4c
fyne.io/fyne/v2/widget.(*Entry).Undo(0xc000d7fc08)
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:787 +0x49
fyne.io/fyne/v2/widget.(*Entry).registerShortcut.func1({0xc000d7fc58?, 0x7ff6a5349920?})
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:1160 +0x17
fyne.io/fyne/v2.(*ShortcutHandler).TypedShortcut(0xc000d7fc58, {0x7ff6a55c8580, 0x7ff6a5b67b80})
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/shortcut.go:21 +0x6e
fyne.io/fyne/v2/widget.(*Entry).TypedShortcut(0xc0002eca20?, {0x7ff6a55c8580?, 0x7ff6a5b67b80?})
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:966 +0x25
fyne.io/fyne/v2/internal/driver/glfw.(*window).triggersShortcut.func1()
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:912 +0x24
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(...)
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/common/window.go:35
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
home/Go/dependency/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:997 +0x136
2024/07/18 00:06:27 exit status 2
exit status 1
The text was updated successfully, but these errors were encountered: