Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

[BUG] - crash when longtime run PixelStreaming #478

Closed
mail555 opened this issue Jan 25, 2024 · 12 comments
Closed

[BUG] - crash when longtime run PixelStreaming #478

mail555 opened this issue Jan 25, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@mail555
Copy link

mail555 commented Jan 25, 2024

UE Version:
UE 5.2

Frontend Version:
UE5.2-0.6.5

Problem component
Frontend, Pixel Streaming C++ plugin

Description
after long time run full eidtor PixelStreaming from browser, UE editor crash and show "out of video memory trying to allocate a rendering resource. make sure your video card has the minimum required memory, try lowering the resolution and/or closing other applications that are running. exiting"

Platform (please complete the following information):

  • OS: [Windows 11]
  • Browser + version [edge 120]
@mail555 mail555 added the bug Something isn't working label Jan 25, 2024
@mail555
Copy link
Author

mail555 commented Jan 25, 2024

whether ue editor use directx12 or directx11 all crash.

@Belchy06
Copy link
Collaborator

Belchy06 commented Feb 5, 2024

Hey @mail555,

We're aware of this issue with the fix having landed in the ue5-main branch, and scheduled to be a part of the 5.4 release.

Alternatively, if you're hard-stuck using 5.2, I'd recommend using a source build of the engine and copying the code change seen here to your engine.

Cheers

@Belchy06 Belchy06 closed this as completed Feb 5, 2024
@mail555
Copy link
Author

mail555 commented Feb 5, 2024

after change VideoEncoder.h TSharedPtr& To TSharedPtr, i test stream full editor in ue5.2, browser and editor still crash and show error:
GPU Crashed or D3D Device Removed.

Use -d3ddebug to enable the D3D debug device.
Check log for GPU state information.

The UE-xxx Editor has crashed and will close

Fatal error: [File:C:\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp] [Line: 873]
Interfaces.CopyCommandList->Close() failed
at C:\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandList.cpp:268
with error E_INVALIDARG

@Belchy06
Copy link
Collaborator

Belchy06 commented Feb 5, 2024

Is this crash after running for a long time, or is it happening instantly?

I'd suggest trying to launch with -d3ddebug so we can try and see what's triggering the crash.

Cheers

@mail555
Copy link
Author

mail555 commented Feb 5, 2024

I use -d3ddebug testing,find some error log,but not crash until now.
The previous several times crash after running some minutes, not very long time or instantly.

LogWindows: Failed to load 'WinPixGpuCapturer.dll' (GetLastError=126)
LogWindows: Failed to load 'nvcuda.dll' (GetLastError=126)
LogWindows: Failed to load 'nvcuvid.dll' (GetLastError=126)
LogWindows: Failed to load 'nvEncodeAPI64.dll' (GetLastError=126)
LogPixelStreaming: Error: Selected codec was not a supported codec, falling back to negotiating codecs...
LogD3D12RHI: Create ID3D12DescriptorHeap: Addr=0x000001A3B1AD6070, ExtRef=1, IntRef=0
LogD3D12RHI: Error: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000001A4243F1C60:'FD3D12CommandList (GPU 0)'): Before state (0xE0: D3D12_RESOURCE_STATE_DEPTH_READ|D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE|D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000001A3D8E51DB0:'SceneDepthZ') (subresource: 1) specified by transition barrier does not match with the state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) specified in the previous call to ResourceBarrier

@mail555
Copy link
Author

mail555 commented Feb 5, 2024

seem memory leakage still exists after change TSharedPtr TChildResource, still appear "Out of video memory trying to allocate a rendering resource. Make sure your video card has the minimum required memory, try lowering the resolution and/or closing other applications that are running. Exiting..."

@Belchy06
Copy link
Collaborator

Belchy06 commented Feb 5, 2024

Okay, interesting.

From our internal QA, this solution fixed the memory leak and we've been able to have instances running for days without crashing.

To double check, I'd try running a sample project (eg the Third Person template) and seeing if that still crashes with the Out Of Memory exception.

Let me know how that goes and we can see what to do from there.

Cheers

@mail555
Copy link
Author

mail555 commented Feb 5, 2024

I run pixel streaming not in game such as third person template, i run in full editor pixelstreaming.
my computer memory total 32GB.
my operater in full editor pixelstreaming is click editor custom button, it will createproc to importassetauto,after auto import one asset, proc will finish and loop createproc to importassetauto, in my computer memory will increase until Out of video memory.
but do same operate in editor not full editor pixelstreaming memory is enough do this,so i think is full editor pixstreaming(not game pixstreaming) memory problem.

@Belchy06
Copy link
Collaborator

Belchy06 commented Feb 5, 2024 via email

@mail555
Copy link
Author

mail555 commented Feb 5, 2024

https://github.com/EpicGames/UnrealEngine/commit/ea8a1723f1c1ef25c529232aa7cd3cff76ce3962 change as later version of the engine,effect is not improve markedly in my test.

@mail555
Copy link
Author

mail555 commented Feb 7, 2024

Hey @Belchy06 , a good update for you,

except synchronization VideoEncoder code, i change GraphicsRHI to dx11, set DynamicGlobalIlluminationMethod to 0 in DefaultEngine.ini, then ue5.2 full editor streaming run normal, make use of memory very stable, memory keep Low utilization rate.

but i don't indeterminacy which change play a decisive role, dx11 or DynamicGlobalIlluminationMethod or VideoEncoder code

@TxMat
Copy link

TxMat commented Feb 8, 2024

Same issue here. Will this fixes be deployed to 5.3 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants