Skip to content

Conversation

@oSumAtrIX
Copy link
Contributor

@oSumAtrIX oSumAtrIX commented Feb 28, 2022

This pull request fixes the race condition when calling .ToArray() on a ConcurrentDictionary in the ImageCache class.
Related issue: #1039

@taooceros
Copy link
Member

Interesting, Thank you! I previously thought that ToArray maybe more safe because of it create a buffer, but it seems that I am wrong.

@taooceros taooceros added the bug Something isn't working label Feb 28, 2022
@taooceros taooceros added this to the 1.10.0 milestone Feb 28, 2022
@taooceros taooceros enabled auto-merge February 28, 2022 02:45
@taooceros taooceros merged commit 824b7ba into Flow-Launcher:dev Feb 28, 2022
@oSumAtrIX
Copy link
Contributor Author

oSumAtrIX commented Feb 28, 2022

ToArray maybe more safe because of it create a buffer

Actually, I am not sure either, locking would probably be safer, any operation on ConcurrentDictionary can lead to unexpected behaviour. More tests would have to be conducted to confirm that.

@taooceros
Copy link
Member

ToArray maybe more safe because of it create a buffer

Actually, I am not sure either, locking would probably be safer. More tests have to be conducted to confirm that.

even locking, it will be modified else where, so no difference. I remember ConcurrentDic provides a safe version of enumeration, so remove toarray should be fine.

@jjw24 jjw24 modified the milestones: 1.10.0, 1.9.3 Mar 1, 2022
@jjw24 jjw24 mentioned this pull request Mar 2, 2022
jjw24 added a commit that referenced this pull request Mar 3, 2022
## Bug fixes
- Addresses the issue where WindowsSettings plugin results appear higher than other results #1020 

- Fixed an issue where full screen mode does not disable hotkey when enabled #1037 

- Fixed some potential issues when loading plugins that use shared assembly #1036 

- Sorted out a race condition issue causing image loading on some results to fail #1040 

- Revised ttf/otf support #935 

- Resolved the issue where WebSearch plugin would crash if not connected to internet #977 

- Fixed incorrect text for "New Tab" and "New Window" buttons under Settings' default browser section #951 

- Fixed typos in plugin title and WindowsSettings name inside the context menu #1056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants