You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
We used the Fuzz engine to modify some Test(TestEntry_OnCopy) data, and then the following crash appeared. Is this due to some simulated keyboard operation?
How to reproduce
The simplified test code is in Example code
Screenshots
Crash Log
panic: runtime error: slice bounds out of range [:-1] [recovered]
panic: runtime error: slice bounds out of range [:-1]
goroutine 88 [running]:
testing.tRunner.func1.2({0x87e8c0, 0xc0000240f0})
/home/zjx/.local/go/src/testing/testing.go:1211 +0x24e
testing.tRunner.func1()
/home/zjx/.local/go/src/testing/testing.go:1214 +0x218
panic({0x87e8c0, 0xc0000240f0})
/home/zjx/.local/go/src/runtime/panic.go:1038 +0x215
fyne.io/fyne/v2/widget.(*Entry).SelectedText(0xc00000c1e0)
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry.go:442 +0x218
fyne.io/fyne/v2/widget.(*Entry).copyToClipboard(0xc00044dac0, {0x973e58, 0xc0005c8aa0})
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry.go:770 +0x3f
fyne.io/fyne/v2/widget.(*Entry).registerShortcut.func2({0x970180, 0xc0005c8ab0})
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry.go:887 +0x45
fyne.io/fyne/v2.(*ShortcutHandler).TypedShortcut(0xc00000c228, {0x970180, 0xc0005c8ab0})
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/shortcut.go:21 +0x77
fyne.io/fyne/v2/widget.(*Entry).TypedShortcut(...)
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry.go:750
fyne.io/fyne/v2/widget_test.TestEntry_OnCopy(0x0)
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry_test.go:467 +0x14d
Example code
//part of the Test Codee:=widget.NewEntry()
e.SetText("\n\n\n\n\n\n\n\n\n\n")
typeKeys(e, fyne.KeyRight, fyne.KeyRight, keyShiftLeftDown, fyne.KeyRight, fyne.KeyRight, fyne.KeyRight)
clipboard:=test.NewClipboard()
shortcut:=&fyne.ShortcutCopy{Clipboard: clipboard}
e.TypedShortcut(shortcut)
Checklist
Describe the bug
We used the Fuzz engine to modify some Test(TestEntry_OnCopy) data, and then the following crash appeared. Is this due to some simulated keyboard operation?
How to reproduce
The simplified test code is in Example code
Screenshots
Crash Log
Example code
Fyne version
commit 638ae24 (HEAD -> master, origin/master, origin/HEAD)
Go compiler version
1.17.8
Operating system
Linux
Operating system version
OS: Linux r920 4.15.0-159-generic #167-Ubuntu
Additional Information
No response
The text was updated successfully, but these errors were encountered: