From https://udn.unrealengine.com/questions/292741/fmultireadersinglewritergt-isnt-thread-safe.html:
I've found that FMultiReaderSingleWriterGT has at least 2 bugs:
The one that caused a deadlock in our game and caused me to investigate was this:
This is deadlocked because ReadCounter is 0, but Action is left set as ReadingAction when the game thread releases the lock. Removing the IsInGameThread() guards in LockRead() and UnlockRead() would fix this.
I also noticed there is also a more standard problem that occurs with these kinds of lock, that the control data isn't guarded, so you can get two threads modifying the lock in this pattern:
Result: Thread 2 is reading, but lock is set to NoAction.
N/A
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
UMG RichText not appear image when packaged
What is the difference between Camera and CineCamera?
How does TArray loop correctly remove elements in blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-30929 in the post.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.10, 4.11 |
Target Fix | 4.15 |
Created | May 17, 2016 |
---|---|
Resolved | Nov 30, 2016 |
Updated | Apr 27, 2018 |