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
geekaurora
changed the title
[Crash] CZWebImage Crash - after force quit app 5 times.
[Crash] CZWebImage Crash - caused by WriteFile threadsafety.
Jun 29, 2021
geekaurora
changed the title
[Crash] CZWebImage Crash - caused by WriteFile threadsafety.
[Crash] CZWebImage Crash - caused by CZHttpFile.WriteFile threadsafety.
Jun 29, 2021
Description
CZGithubAppKit - CZWebImage Crash (Force quit 5 times: Data = empty)(First page)
Reason
Details
Write to file wasn't atomic, and no
ioQueue.async(flags: .barrier)
:In
CZDiskCacheManager.setCacheFile()
,data.write(to: fileURL)
should bedata.write(to: fileURL, options: [.atomic])
.Solution
In
CZDiskCacheManager.setCacheFile()
,ioQueue.async(flags: .barrier)
: will cause performance issue as many image files are being written to disk when scrolling. (it was ioQueue.async(flags: .barrier), removed for performance reason) - [Won't Fix][P2][Performance] CZDiskCacheManager.setCacheFile() - WriteFile threadsafety ioQueue.async(flags: .barrier) #38Others
The text was updated successfully, but these errors were encountered: