Skip to content

Application stops responding when scrolling a table #4263

Closed
@mpldr

Description

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

When scrolling in a table, the program suddenly became unresponsive. Not sure if it is because of that

How to reproduce

Could not reliably reproduce. Here is a dump.
deadlock.txt

Screenshots

No response

Example code

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)

var dummylog = [][]string{
	{"Time", "Level", "Message"},
	{"2023-09-18T12:03:27.261+02:00", "WARN", "no config loaded"},
	{"2023-09-18T12:03:27.261+02:00", "INFO", "starting uniview"},
	{"2023-09-18T12:03:27.261+02:00", "DEBUG", "connecting"},
	{"2023-09-18T12:03:27.261+02:00", "DEBUG", "starting player…"},
}

func main() {
	myApp := app.NewWithID("sh.moritz.slocker")
	myWindow := myApp.NewWindow("Stop Slacking, Start Slocking!")
	searchbox := widget.NewEntry()
	topbar := container.New(layout.NewHBoxLayout(), widget.NewButton("O", func() {}), widget.NewButton("↓", func() {}), searchbox)

	list := widget.NewTable(
		func() (int, int) {
			return len(dummylog), len(dummylog[0])
		},
		func() fyne.CanvasObject {
			label := widget.NewLabel("")
			label.TextStyle.Monospace = true
			return label
		},
		func(i widget.TableCellID, o fyne.CanvasObject) {
			o.(*widget.Label).SetText(dummylog[i.Row][i.Col])
		})

	content := container.New(layout.NewVBoxLayout(), topbar, list)
	myWindow.SetContent(content)

	myWindow.Show()
	myApp.Run()
}

Fyne version

v2.4.0

Go compiler version

go version go1.21.1 linux/amd64

Operating system and version

Archlinux

Additional Information

Program was running in Xwayland. Not sure, if that matters, but I better mention it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions