adamrehn / pixel-streaming-linux

Issue tracker repository for Pixel Streaming for Linux
https://adamrehn.com/articles/pixel-streaming-in-linux-containers/
22 stars 7 forks source link

VulkanRHI is not valid 4.26 #52

Closed 704779832 closed 3 years ago

704779832 commented 3 years ago

I try to open the pixel stream in 4.26 on linux. I fixed some visibility errors and added code to dynamically load the library But finally a null pointer error occurred.

[2021.07.20-06.52.53:260][ 0]LogAudioMixer: Display: Output buffers initialized: Frames=1024, Channels=6, Samples=6144 [2021.07.20-06.52.53:262][ 0]LogAudioMixer: Display: Starting AudioMixerPlatformInterface::RunInternal() [2021.07.20-06.52.53:262][ 0]LogInit: FAudioDevice initialized. [2021.07.20-06.52.53:263][ 0]LogNetVersion: Set ProjectVersion to 1.0.0.0. Version Checksum will be recalculated on next use. [2021.07.20-06.52.53:264][ 0]LogInit: Texture streaming: Enabled [2021.07.20-06.52.53:279][ 0]LogAudio: Display: Audio Device (ID: 1) registered with world 'Untitled'. [2021.07.20-06.52.53:279][ 0]LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden [2021.07.20-06.52.53:280][ 0]LogInit: Display: Game Engine Initialized. [2021.07.20-06.52.53:280][ 0]LogCUDA: Display: Initialising CUDA API... [2021.07.20-06.52.53:327][ 0]LogCUDA: Display: CUDA API initialised successfully. [2021.07.20-06.52.53:327][ 0]LogCUDA: Display: Found 1 CUDA capable devices. [2021.07.20-06.52.53:327][ 0]LogCUDA: Display: Found device 0 called NVIDIA GeForce RTX 2070 SUPER. [2021.07.20-06.52.53:327][ 0]LogCUDA: Display: Attempting to create CUDA context on GPU Device 0... [2021.07.20-06.52.53:378][ 0]LogCUDA: Display: Created CUDA context on device NVIDIA GeForce RTX 2070 SUPER! [2021.07.20-06.52.53:378][ 0]LogAVEncoder: Available video encoders: None [2021.07.20-06.52.53:378][ 0]LogAVEncoder: Available audio encoders: , wmf(aac) [2021.07.20-06.52.53:378][ 0]PixelPlayer: Warning: Failed to create DXGI Manager and Device [2021.07.20-06.52.53:378][ 0]PixelStreamer: PixelStreaming endpoint ID: [2021.07.20-06.52.53:378][ 0]LogCore: Warning: searching for libnvidia-encode.so.1 globally [2021.07.20-06.52.53:382][ 0]LogCore: Warning: searching for libnvidia-encode.so.1 globally [2021.07.20-06.52.53:382][ 0]LogCore: Warning: searching for libnvidia-encode.so.1 globally [2021.07.20-06.52.53:382][ 0]LogCudaVideoEncoder: FCudaVideoEncoder initialization with 1920*1080, 60 FPS [2021.07.20-06.52.53:389][ 0]LogCudaVideoEncoder: Created texture 0x7fcf5cae1900 for CUDA CommonUnixCrashHandler: Signal=11 [2021.07.20-06.52.53:400][ 0]LogCore: === Critical error: === Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000000

[2021.07.20-06.52.53:400][ 0]LogCore: Fatal error!

After investigation, I found that the error was caused by VulkanRHI::vkGetDeviceProcAddr returning a null pointer

auto fpGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)VulkanRHI::vkGetDeviceProcAddr(device, "vkGetMemoryFdKHR");

This code is on line 158 of the file CudaTexture.cpp