You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
UI can deadlock due to acquiring the same read lock twice in a single goroutine. If any other goroutine acquires the same lock for write between the two reads - the second read will hang and never release the first, meaning the entire UI deadlocks.
Here is the sequence that causes the double read lock:
(*Button).CreateRenderer takes the propertyLock.RLock(), and so does (*BaseWidget).Visible which is further down the stacktrace.
How to reproduce
It is a race condition so it will be hard to reproduce without modifying the code to enforce the ordering that causes the deadlock. It is easy to see from the code that the possibility of deadlock exists. In my case - the thread waiting on the write lock was trying to call .Hide() on the button.
Screenshots
No response
Example code
No code needed.
Fyne version
2.5.0
Go compiler version
1.19.3
Operating system and version
Windows 10
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
UI can deadlock due to acquiring the same read lock twice in a single goroutine. If any other goroutine acquires the same lock for write between the two reads - the second read will hang and never release the first, meaning the entire UI deadlocks.
Here is the sequence that causes the double read lock:
(*Button).CreateRenderer
takes thepropertyLock.RLock()
, and so does(*BaseWidget).Visible
which is further down the stacktrace.How to reproduce
It is a race condition so it will be hard to reproduce without modifying the code to enforce the ordering that causes the deadlock. It is easy to see from the code that the possibility of deadlock exists. In my case - the thread waiting on the write lock was trying to call
.Hide()
on the button.Screenshots
No response
Example code
No code needed.
Fyne version
2.5.0
Go compiler version
1.19.3
Operating system and version
Windows 10
Additional Information
No response
The text was updated successfully, but these errors were encountered: