Skip to content

Multiple select popups during background operations (crash) #4730

Closed
@stridebn

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 clicking multiple times on a select object while the program is performing background tasks, many Fyne reads each click and generates multiple popups below the select. This causes the program to crash.

How to reproduce

During any background operation where the window is unresponsive, click multiple times on any select. Once the window is responsive, click on the dropdown menus to select items. Multiple popups will have generated, and a click on any but the top will crash the program.

Screenshots

No response

Example code

The following can be put in an application to demonstrate the issue.

    selectOptions := []string{"Option 1", "Option 2"}
    testSelect := widget.NewSelect(selectOptions, func(selected string) {
        fmt.Println("selected: ", selected)
    })
    testSelect.PlaceHolder = "Click me multiple times after clicking the button"
    waitButton := widget.NewButton("Click me!", func() {
        start := time.Now()
        // Loop until the specified duration has passed
        for time.Since(start) < (5 * time.Second) {
            // This is the busy wait part, where the loop continuously checks the time
        }
    })

Fyne version

2.4.4

Go compiler version

1.19.2

Operating system and version

Mac 12.7.1

Additional Information

No response

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

    unverifiedA bug that has been reported but not verified

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions