FStreamableHandle (used as part of the FStreamableManager system) has a CancelHandle function that stops it from calling any completion callbacks related to that handle (it could cancel the load request if that is supported by a loader). This works properly if the handle is canceled before it starts to execute the callback. However, if you try to cancel one handle from a completion/cancel callback for another handle that is processed in the same frame, it can call the completion callback after the handle has been canceled because it was already in the execution queue. This is inconsistent because the comment says this will not happen, and it could result in both the completion and cancelation callback happening for the same handle.
Code that can cause this case to occur is attached as StreamableManagerTest.cpp, with this snippet illustrating the problem:
// Given ... TSharedPtr<FStreamableHandle> A, B; int Count = 0; // ... The ensure() should not fail, but actually it fails: A = StreamableManager.RequestAsyncLoad(AssetPath, [this]() { B->CancelHandle(); ensure(++Count == 1); }); B = StreamableManager.RequestAsyncLoad(AssetPath, [this]() { A->CancelHandle(); ensure(++Count == 1); });
Expected behavior:
The automated test will succeed
Actual behavior:
The automated test will ensure and fail because it fails to cancel the handle
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Teleporter in the Creative Hub is Locked and cannot be accessed
What method is used to fill polygonal regions when drawing spline mesh at run time?
How to achieve HLSL Multiple Render Target in Material blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-207209 in the post.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 5.0, 5.5 |
Target Fix | 5.6 |
Created | Feb 16, 2024 |
---|---|
Updated | Sep 20, 2024 |