Skip to content
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

Crash in widget.(*RichText).updateRowBounds.func1 #3291

Closed
2 tasks done
secsys-go opened this issue Sep 28, 2022 · 1 comment
Closed
2 tasks done

Crash in widget.(*RichText).updateRowBounds.func1 #3291

secsys-go opened this issue Sep 28, 2022 · 1 comment
Labels
unverified A bug that has been reported but not verified

Comments

@secsys-go
Copy link

Checklist

  • 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_MultilineWrapping_DeleteWithBackspace) data, and then the following crash appeared. Originally I thought it was similar to the issue #3288 & #3289, but this requires two other corrupt data to trigger, and finally crash in different location.

How to reproduce

The simplified test code is in Example code

Screenshots

CrashLog

panic: runtime error: index out of range [-1] [recovered]
        panic: runtime error: index out of range [-1]

goroutine 100 [running]:
testing.tRunner.func1.2({0x87e8c0, 0xc000024288})
        /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, 0xc000024288})
        /home/zjx/.local/go/src/runtime/panic.go:1038 +0x215
fyne.io/fyne/v2/widget.(*RichText).updateRowBounds.func1({0xc00083e6e0, 0x1, 0xc0005adb78})
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/richtext.go:381 +0xbc5
fyne.io/fyne/v2/widget.(*RichText).updateRowBounds(0xc0001646e0)
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/richtext.go:411 +0x106
fyne.io/fyne/v2/widget.(*RichText).Refresh(0xc0001646e0)
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/richtext.go:89 +0x1e
fyne.io/fyne/v2/widget.(*RichText).insertAt(0xc0001646e0, 0x5, {0xc0005add78, 0x1})
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/richtext.go:226 +0x285
fyne.io/fyne/v2/widget.(*Entry).TypedRune(0xc00000c1e0, 0x30)
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry.go:738 +0x11b
fyne.io/fyne/v2/test.typeChars({0xc0005ade20, 0x6, 0xc0005ade68}, 0xc0005adea0)
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/test/test.go:311 +0x39
fyne.io/fyne/v2/test.Type({0x976960, 0xc00000c1e0}, {0x8ab7bd, 0x6})
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/test/test.go:232 +0xbc
fyne.io/fyne/v2/widget_test.TestEntry_MultilineWrapping_DeleteWithBackspace(0x0)
        /home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/widget/entry_test.go:428 +0xc5

Example code

//part of the Test Code
	entry := widget.NewMultiLineEntry()
	entry.Wrapping = fyne.TextWrapWord
	entry.Resize(fyne.NewSize(64, -3.0268908e+12))
	test.Type(entry, "\x20\x30\x30\x30\xD4")
	test.Type(entry, "\x20\x30\x30\x30\xD4\x20")

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

@secsys-go secsys-go added the unverified A bug that has been reported but not verified label Sep 28, 2022
alexballas added a commit to alexballas/fyne that referenced this issue Dec 30, 2022
alexballas added a commit to alexballas/fyne that referenced this issue Dec 31, 2022
alexballas added a commit to alexballas/fyne that referenced this issue Dec 31, 2022
alexballas added a commit to alexballas/fyne that referenced this issue Dec 31, 2022
alexballas added a commit to alexballas/fyne that referenced this issue Dec 31, 2022
@andydotxyz
Copy link
Member

This seems to have been resolved by v2.3.0

@andydotxyz andydotxyz added this to the Fixes (v2.3.x) milestone Feb 8, 2023
andydotxyz pushed a commit to andydotxyz/fyne that referenced this issue Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

2 participants