We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fyne-io
andydotxyz
toaster
Jacalz
changkun
Learn more about funding links in repositories.
Report abuse
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
Occasionally when selecting text in a multi-line widget.Entry, one of these panics occur:
panic: interface conversion: fyne.CanvasObject is *widget.textProvider, not *canvas.Rectangle goroutine 12 [running]: fyne.io/fyne/v2/widget.(*entryContentRenderer).Refresh(0xc000067260) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1333 +0x493 fyne.io/fyne/v2/widget.(*entryRenderer).Refresh(0xc000024680) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1193 +0x35c fyne.io/fyne/v2/widget.(*BaseWidget).Refresh(0xc0002be480) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/widget.go:139 +0x5c fyne.io/fyne/v2/widget.(*BaseWidget).setFieldsAndRefresh(0xc0002be480, 0xc00004cef0) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/widget.go:165 +0x7e fyne.io/fyne/v2/widget.(*Entry).updateMousePointer(0xc0002be480, 0xc000209340, 0xc000546400) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1036 +0x97 fyne.io/fyne/v2/widget.(*Entry).Dragged(0xc0002be480, 0xc000209340) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:245 +0x45 fyne.io/fyne/v2/widget.(*entryContent).Dragged(0xc0000704b0, 0xc000209340) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1253 +0x39 fyne.io/fyne/v2/internal/driver/glfw.(*window).mouseMoved.func4() .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:667 +0x38 fyne.io/fyne/v2/internal/driver/glfw.(*window).runEventQueue(0xc00014a1c0) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:1242 +0x7a created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:1266 +0x10d
and:
panic: interface conversion: fyne.CanvasObject is *widget.textProvider, not *canvas.Rectangle goroutine 25 [running]: fyne.io/fyne/v2/widget.(*entryContentRenderer).Refresh(0xc0000b7200) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1333 +0x493 fyne.io/fyne/v2/widget.(*entryRenderer).Refresh(0xc0000cc600) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1193 +0x35c fyne.io/fyne/v2/widget.(*BaseWidget).Refresh(0xc000083200) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/widget.go:139 +0x5c fyne.io/fyne/v2/widget.(*BaseWidget).setFieldsAndRefresh(0xc000083200, 0xc00004cef0) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/widget.go:165 +0x7e fyne.io/fyne/v2/widget.(*Entry).updateMousePointer(0xc000083200, 0xc0004e0c60, 0xc000620300) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1036 +0x97 fyne.io/fyne/v2/widget.(*Entry).Dragged(0xc000083200, 0xc0004e0c60) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:245 +0x45 fyne.io/fyne/v2/widget.(*entryContent).Dragged(0xc0000b8460, 0xc0004e0c60) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/widget/entry.go:1253 +0x39 fyne.io/fyne/v2/internal/driver/glfw.(*window).mouseMoved.func4() .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:667 +0x38 fyne.io/fyne/v2/internal/driver/glfw.(*window).runEventQueue(0xc0000fe1c0) .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:1242 +0x7a created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 .../go/pkg/mod/fyne.io/fyne/v2@v2.0.0/internal/driver/glfw/window.go:1266 +0x10d
This is about a 90% reproduction for me:
Wrapping = fyne.TextWrapWord
MultiLine = true
After step 3 the selection seems to get a bit laggy, or ignores the cursor for a bit, and then when it starts again in step 4 fyne panics.
package main import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) var ( input = widget.NewEntry() output = widget.NewEntry() ) func main() { seeker := app.New() window := seeker.NewWindow("Seeker") window.Resize(fyne.Size{Width: 800, Height: 300}) window.SetContent(container.NewGridWithColumns(2, leftColumn())) input.Wrapping = fyne.TextWrapWord input.MultiLine = true output.MultiLine = true output.Disable() input.SetText("Hello,\nthis\nis\na\ntest\nFoo\nbar\nbaz\nline\nline\nline") window.Show() seeker.Run() } func leftColumn() *fyne.Container { return container.NewGridWithColumns(1, container.NewBorder( widget.NewLabel("Input:"), nil, nil, nil, input, ), container.NewBorder( widget.NewLabel("Output:"), nil, nil, nil, container.NewMax(output), ), ) }
fyne.io/fyne/v2 v2.0.0 h1:TfsS3bNq5663BpXsoz1OfzyjcaMqqOf9usI8ZKkw4IE=
The text was updated successfully, but these errors were encountered:
Sample content of selections when it panics:
selections
But I can't see anywhere that actually adds a widget.textProvider to selections...
Sorry, something went wrong.
That's a good catch. Thanks for reporting this.
Merge pull request #1988 from fpabl0/fix/1983
78b4eaf
Do not append entryContentRenderer's objects in the selection slice, fixes #1983
Fixed on the develop branch as of 78b4eaf.
No branches or pull requests
Describe the bug:
Occasionally when selecting text in a multi-line widget.Entry, one of these panics occur:
and:
To Reproduce:
This is about a 90% reproduction for me:
Wrapping = fyne.TextWrapWord
andMultiLine = true
After step 3 the selection seems to get a bit laggy, or ignores the cursor for a bit, and then when it starts again in step 4 fyne panics.
Screenshots:
Example code:
Device (please complete the following information):
fyne.io/fyne/v2 v2.0.0 h1:TfsS3bNq5663BpXsoz1OfzyjcaMqqOf9usI8ZKkw4IE=
The text was updated successfully, but these errors were encountered: