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

Application stops responding when scrolling a table #4263

Closed
2 tasks done
mpldr opened this issue Sep 19, 2023 · 8 comments
Closed
2 tasks done

Application stops responding when scrolling a table #4263

mpldr opened this issue Sep 19, 2023 · 8 comments
Labels
information-needed Further information is requested

Comments

@mpldr
Copy link

mpldr commented Sep 19, 2023

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.

@mpldr mpldr added the unverified A bug that has been reported but not verified label Sep 19, 2023
@andydotxyz
Copy link
Member

I cannot see the deadlock in the log.

It is very difficult to test with the table squashed into a VBox - can you replicate it if the list is the full content of the window?

@andydotxyz andydotxyz added information-needed Further information is requested and removed unverified A bug that has been reported but not verified labels Sep 19, 2023
@mpldr
Copy link
Author

mpldr commented Sep 20, 2023

The deadlock is not a "deadlock"-deadlock because the first goroutine is technically still running, it's just not doing anything to get the other goroutines to run. The application also wouldn't respond to any but the deadly signals or any kind of input. #4210 could be related, but I'm not sure about that.

@andydotxyz andydotxyz changed the title Deadlock when scrolling a table Application stops responding when scrolling a table Sep 20, 2023
@andydotxyz
Copy link
Member

Please test against the develop branch. If the issues were related this could be fixed already.

@junmaqiang
Copy link

I also encountered a similar situation. When I clicked on the area outside the table component unit, the entire program was stuck, and then it took a while for the first row and column to be selected, which was similar to a stuck state.

@andydotxyz
Copy link
Member

Are you testing latest develop? It should be fixed already as noted above.

@mpldr
Copy link
Author

mpldr commented Sep 29, 2023

I did and could not reproduce. So I guess it's either fixed or rare enough :D

@mpldr mpldr closed this as completed Sep 29, 2023
@andydotxyz andydotxyz added this to the D fixes (v2.4.x) milestone Sep 29, 2023
@nnsay

This comment was marked as off-topic.

@andydotxyz

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information-needed Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants