Reentrancy error #10725
Replies: 1 comment 1 reply
-
So, I remember that sometimes the CompositionTarget_Rendering method would trigger multiple times in a frame. I remember using a check in UWP to catch those cases. Copilot says that updating the text can be an issue, I don't think that is the issue here, but anyway, I've changed the text update code to... var fps = Renderer?.FpsCounter.Reading.ToString();
_ = XamlFps.DispatcherQueue.TryEnqueue(() =>
{
XamlFps.Text = fps;
}); I still see the reentracy issue. Execution is breaking on this line... public void WaitPresentCompleted()
{
//Debug.WriteLine("WaitPresentCompleted | Value = " + Value_PresentCompleted);
if (Fence_PresentCompleted.CompletedValue < Value_PresentCompleted)
{
Fence_PresentCompleted.SetEventOnCompletion(Value_PresentCompleted, Event_PresentCompleted);
Event_PresentCompleted.WaitOne(); // <----- Break here
}
Value_PresentCompleted++;
} I see Dx11 programs always use the Xaml rendering method - I guess with Dx12 we can't do that anymore? I just don't know how to solve this. This issue has been showing up over the past few days while I struggled with putting rendering on it's own thread. I just couldn't work it out (issues with fencing - not being able to prevent different back-buffers from being hit). I've reverted to just doing rendering on the main thread. So just sticking to one thread for the moment, how do I address this issue? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I keep seeing this error...
I'm rendering a spinning cube with DirectX 12 (Vortice), here's my CompositionTarget_Rendering method...
I can trigger the reentracy error and crash by mousing over the window. Is this my fault?
Beta Was this translation helpful? Give feedback.
All reactions