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

File Dialog screen without content #5531

Open
2 tasks done
Lempi-sudo opened this issue Feb 13, 2025 · 1 comment
Open
2 tasks done

File Dialog screen without content #5531

Lempi-sudo opened this issue Feb 13, 2025 · 1 comment
Labels
unverified A bug that has been reported but not verified

Comments

@Lempi-sudo
Copy link

Lempi-sudo commented Feb 13, 2025

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

Sometimes, when using the File Open dialog, opening a folder results in an empty window. The contents of the folder do not appear immediately.

The freeze will occur at 1 out 40-50 directory changes.
The freeze is non-recurrent. It occurs randomly.
The systems state on the moment of bug is impossible to reproduce. The bug occurs chaotically.

Workarounds:
In that case when you have a blank window. Resizing the window using the cursor makes the contents appear. Stepping out of the folder and then stepping back in also resolves the issue.

Expected Behavior:
The folder contents should be displayed immediately upon opening, without requiring manual resizing or navigation.

Let me know if you need further refinements!

How to reproduce

To reproduce this bug you have to:

  1. run the code,
  2. open file dialog,
  3. step into some random folder,
  4. step out until a freeze (the screen will go empty without any folders or files) in the widget.
  5. If nothing happens, repeat step 3 and 4,

Screenshots

Image
Image
Image
Image

Example code

func main() {
	myApp := app.New()
	myWindow := myApp.NewWindow("File Dialog Example")
	myWindow.Resize(fyne.NewSize(800, 600))
	openButton := widget.NewButton("Open File Dialog", func() {
		fileDialog := dialog.NewFileOpen(func(reader fyne.URIReadCloser, err error) {
			if err != nil {
				dialog.ShowError(err, myWindow)
				return
			}
			if reader == nil {
				return
			}
			defer reader.Close()
			filePath := reader.URI().Path()
			fmt.Println("Selected file:", filePath)
		}, myWindow)
		fileDialog.Show()
	})
	myWindow.SetContent(container.NewVBox(
		openButton,
	))
	myWindow.ShowAndRun()
}

Fyne version

fyne.io/fyne/v2 v2.4.4

Go compiler version

go 1.21.5

Operating system and version

Windows 10

Additional Information

This issue occurs on multiple devices, including my laptop and my friends' laptops.

@Lempi-sudo Lempi-sudo added the unverified A bug that has been reported but not verified label Feb 13, 2025
@Jacalz
Copy link
Member

Jacalz commented Feb 14, 2025

Thanks for reporting this. Does this reproduce with v2.6.0-alpha1? The backend has seen a massive rework to remove race conditions and improve performance.

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