-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Trying to hide subsequently created popups in a goroutine results in Fyne runtime panic #5564
Comments
We should fix this panic. But you should also be careful not to throw up multiple popups without checking - they are stacked, so if you show 1 then 2 then 3 and then hide 1 then the other two will no longer be shown to the user. |
Thanks for the demo code, that PR seems to address it :) |
ty for fixing this. And thanks for the important clarification on how to they work. In my experience it works fine as long as you hide them in lifo order, but that can of course not be guaranteed when showing multiple popups in parallel that close themselves after varying durations. So I will have to rethink the implementation of them. |
Yes it should indeed work that way - but as you say sometimes things may not be so well ordered in app lifecycle. |
Does using v2.6 and |
No. I tested it with 2.6.0-alpha1 and your instructions and getting a similar panic:
|
Strange. Thanks for checking. Seems fine then |
This is now resolved ready for v2.6.0 |
Checklist
Describe the bug
We have a popup that reports on ongoing action to the user and hides itself again, once the action is completed. For example we might be fetching a large dataset from the Internet and want to show the user a modal dialog with a progress bar while he has to wait for the fetching to complete.
When we create multiple popups of this type the Fyne runtime often panics when trying to hide the popup again.
Here is an example panic message, which was produces by running the below example code:
Please note that we have seen the same behavior with normal popups, modal popups and dialogs.
How to reproduce
See example code.
Screenshots
For illustration here is an example dialog that shows progress about an ongoing action to the user:
Example code
Fyne version
2.5.4
Go compiler version
1.23.4
Operating system and version
Ubuntu 22.04
Additional Information
This bug was first encountered with 2.5.4. Since the related code did not change we suspect this bug was introduced with that patch.
The text was updated successfully, but these errors were encountered: