We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found that UE4 crashes with EXCEPTION_ACCESS_VIOLATION when CheckWindowSize is checked and repeated resizing of the target window.
Reproduction steps
Crash message is
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x08cad000 nvwgf2umx d3d11 UE4Editor_D3D11RHI!FD3D11DynamicRHI::RHIUpdateTexture2D() [d:\build\++ue4\sync\engine\source\runtime\windows\d3d11rhi\private\d3d11texture.cpp:1805] UE4Editor_D3D11RHI!FD3D11DynamicRHI::UpdateTexture2D_RenderThread() [d:\build\++ue4\sync\engine\source\runtime\windows\d3d11rhi\private\d3d11texture.cpp:1830] UE4Editor_Engine!<lambda_d3c33e5a8b9daf3a9ced0d8a29defb66>::operator()() [d:\build\++ue4\sync\engine\source\runtime\engine\private\texture2d.cpp:1417] UE4Editor_Engine!TGraphTask<TEnqueueUniqueRenderCommandType<`UTexture2D::UpdateTextureRegions'::`34'::UpdateTextureRegionsDataName,<lambda_d3c33e5a8b9daf3a9ced0d8a29defb66> > >::ExecuteTask() [d:\build\++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:847] UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:686] UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:583] UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:340] UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:471] UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:96]
The text was updated successfully, but these errors were encountered:
The following code change worked for me. But i don't understand well.
diff --git a/mnt/d/Program Files/Epic Games/UE_4.24/Engine/Plugins/Marketplace/WindowCapture2D/Source/WindowCapture2D/Private/CaptureMachine.cpp b/WindowCapture2D/Source/WindowCapture2D/Private/CaptureMachine.cpp index 2fba183..f597966 100755 --- a/mnt/d/Program Files/Epic Games/UE_4.24/Engine/Plugins/Marketplace/WindowCapture2D/Source/WindowCapture2D/Private/CaptureMachine.cpp +++ b/WindowCapture2D/Source/WindowCapture2D/Private/CaptureMachine.cpp @@ -82,6 +82,7 @@ bool UCaptureMachine::DoCapture() #if PLATFORM_WINDOWS if (!m_TargetWindow) return true; if (!TextureTarget) return true; + if (!m_IsUpdatedTexture) return true; if (Properties.CheckWindowSize) { @@ -198,8 +199,12 @@ void UCaptureMachine::UpdateTexture() #if PLATFORM_WINDOWS if (!TextureTarget) return; + m_IsUpdatedTexture = false; auto Region = new FUpdateTextureRegion2D(0, 0, 0, 0, TextureTarget->GetSizeX(), TextureTarget->GetSizeY()); - TextureTarget->UpdateTextureRegions(0, 1, Region, 4 * TextureTarget->GetSizeX(), 4, (uint8*)m_BitmapBuffer); + auto Func = [this](uint8* SrcData, const FUpdateTextureRegion2D* Regions) { + this->m_IsUpdatedTexture = true; + }; + TextureTarget->UpdateTextureRegions(0, 1, Region, 4 * TextureTarget->GetSizeX(), 4, (uint8*)m_BitmapBuffer, Func); #endif } diff --git a/mnt/d/Program Files/Epic Games/UE_4.24/Engine/Plugins/Marketplace/WindowCapture2D/Source/WindowCapture2D/Public/CaptureMachine.h b/WindowCapture2D/Source/WindowCapture2D/Public/CaptureMachine.h index 0a39c38..6941309 100755 --- a/mnt/d/Program Files/Epic Games/UE_4.24/Engine/Plugins/Marketplace/WindowCapture2D/Source/WindowCapture2D/Public/CaptureMachine.h +++ b/WindowCapture2D/Source/WindowCapture2D/Public/CaptureMachine.h @@ -62,6 +62,8 @@ private: FIntVector2D m_OriginalWindowSize; FIntVector2D m_WindowOffset; + bool m_IsUpdatedTexture = true; + class FWCWorkerThread* CaptureWorkerThread = nullptr; class FRunnableThread* CaptureThread = nullptr; };
Sorry, something went wrong.
Thank you for reporting the phenomenon. I will investigate the cause.
No branches or pull requests
I found that UE4 crashes with EXCEPTION_ACCESS_VIOLATION when CheckWindowSize is checked and repeated resizing of the target window.
Reproduction steps
Crash message is
The text was updated successfully, but these errors were encountered: