Closed BielBdeLuna closed 1 year ago
Yes, I found same behavior in game when launching under Vulkan.
in OpenGL the game loads fine but on vulkan the game crashes when rendering the first frames:
$ ./RBDoom3BFG QA Timing INIT: 000175ms RBDOOM 3 BFG 1.3.0.1401 linux-x86_64 Aug 18 2020 11:13:19 ... TODO: Sys_SetPhysicalWorkMemory 3629 msec to load game/mars_city1 signal caught: Segmentation fault <----- SEGFAULT si_code 1 Trying to exit gracefully.. session->GetSaveGameManager().CancelToTerminate(); soundSystem->StopAllSounds(); Stop(); --------- Game Map Shutdown ---------- ...
Maybe this PR https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/378 can fix it?
shutdown terminal support Violació de segment (s'ha bolcat la memòria) <----- SEGFAULT
If you want to run the game with the newest Vulkan SDK then I have to update the renderer and the local glslang to work with it. The last working Vulkan SDK for me was VulkanSDK-1.2.131.2-Installer.exe. After that they broke some headers and also some structs that influence glslang.
It usually results in an internal compiler error with Visual Studio. I have to link against the latest official glslang or use the shaderc compiler to generate the SPIR-V shaders. However switching to newer versions resulted in shader compiler errors so the HLSL -> Vulkan GLSL converter code needs to be fixed first. Unfortunately, I have some crazy work hours at the moment and can't find time to fix it.
If you create a backtrace on Linux then I would expect it to crash somewhere in RenderProgs_VK.cpp where the glslang code is used.
https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/481#issuecomment-675432810 isn't this the solution for the RenderProgs_VK.cpp issue? :)
Vulkan is crashing for me on master branch with 1.2.131 (Linux).
Debug build shows:
RBDoom3BFG: /home/cstout/projects/RBDOOM-3-BFG/neo/renderer/Vulkan/RenderProgs_VK.cpp:1540: void idRenderProgManager::CommitUniforms(uint64): Assertion `image->GetView() != VK_NULL_HANDLE' failed.
The last commit that works well for me is 9872734f621ff572157a8c056c90bba5bf592a12.
oops
Vulkan is crashing for me on master branch with 1.2.131 (Linux).
Debug build shows:
RBDoom3BFG: /home/cstout/projects/RBDOOM-3-BFG/neo/renderer/Vulkan/RenderProgs_VK.cpp:1540: void idRenderProgManager::CommitUniforms(uint64): Assertion `image->GetView() != VK_NULL_HANDLE' failed.
The last commit that works well for me is 9872734.
I could build the PBR2 branch with my fixes in /Vulkan/RenderBackend_VK.cpp and using cmake-linux-vulkan-debug.sh and got a big 200 mb executable.
but it crashes my computer so bad when loading any map.
PBR2 segfaults more friendly when reloading shaders, and when resizing the window, when loading a map it crashes my Radeon drivers!
here is gdb when reloading shaders:
$ gdb ./RBDoom3BFG.vk
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./RBDoom3BFG.vk...
(gdb) start
Temporary breakpoint 1 at 0xbc2cc5: file /home/biel/code/doom/doom3/RBDOOM-3-BFG/neo/sys/posix/platform_linux.cpp, line 618.
Starting program: /home/biel/games/doom/RBdoom3BFG/RBDoom3BFG.vk
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Temporary breakpoint 1, main (argc=0, argv=0x7fffffffdef0) at /home/biel/code/doom/doom3/RBDOOM-3-BFG/neo/sys/posix/platform_linux.cpp:618
618 {
(gdb) continue
Continuing.
QA Timing INIT: 000329ms
RBDOOM 3 BFG 1.3.0.1401-debug linux-x86_64 Oct 12 2020 01:03:52
found interface lo - loopback
found interface wlo1 - 192.168.100.37/255.255.255.0
------ Initializing File System ------
Loaded resource file _common.resources
Loaded resource file _ordered.resources
Loaded resource file _sound_pc.resources
Loaded resource file _sound_pc_en.resources
Loaded resource file maps/admin.resources
Loaded resource file maps/alphalabs1.resources
Loaded resource file maps/alphalabs2.resources
Loaded resource file maps/alphalabs3.resources
Loaded resource file maps/alphalabs4.resources
Loaded resource file maps/caverns1.resources
Loaded resource file maps/caverns2.resources
Loaded resource file maps/comm1.resources
Loaded resource file maps/commoutside.resources
Loaded resource file maps/cpu.resources
Loaded resource file maps/cpuboss.resources
Loaded resource file maps/d3ctf1.resources
Loaded resource file maps/d3ctf2.resources
Loaded resource file maps/d3ctf3.resources
Loaded resource file maps/d3ctf4.resources
Loaded resource file maps/d3dm1.resources
Loaded resource file maps/d3dm2.resources
Loaded resource file maps/d3dm3.resources
Loaded resource file maps/d3dm4.resources
Loaded resource file maps/d3dm5.resources
Loaded resource file maps/d3xpdm1.resources
Loaded resource file maps/d3xpdm2.resources
Loaded resource file maps/d3xpdm3.resources
Loaded resource file maps/d3xpdm4.resources
Loaded resource file maps/delta1.resources
Loaded resource file maps/delta2a.resources
Loaded resource file maps/delta2b.resources
Loaded resource file maps/delta3.resources
Loaded resource file maps/delta4.resources
Loaded resource file maps/delta5.resources
Loaded resource file maps/deltax.resources
Loaded resource file maps/enpro.resources
Loaded resource file maps/erebus1.resources
Loaded resource file maps/erebus2.resources
Loaded resource file maps/erebus3.resources
Loaded resource file maps/erebus4.resources
Loaded resource file maps/erebus5.resources
Loaded resource file maps/erebus6.resources
Loaded resource file maps/hell.resources
Loaded resource file maps/hell1.resources
Loaded resource file maps/hellhole.resources
Loaded resource file maps/le_enpro1.resources
Loaded resource file maps/le_enpro2.resources
Loaded resource file maps/le_exis1.resources
Loaded resource file maps/le_exis2.resources
Loaded resource file maps/le_hell.resources
Loaded resource file maps/le_hell_post.resources
Loaded resource file maps/le_underground.resources
Loaded resource file maps/le_underground2.resources
Loaded resource file maps/mars_city1.resources
Loaded resource file maps/mars_city2.resources
Loaded resource file maps/mc_underground.resources
Loaded resource file maps/monorail.resources
Loaded resource file maps/phobos1.resources
Loaded resource file maps/phobos2.resources
Loaded resource file maps/phobos3.resources
Loaded resource file maps/phobos4.resources
Loaded resource file maps/recycling1.resources
Loaded resource file maps/recycling2.resources
Loaded resource file maps/site3.resources
Current search path:
/home/biel/.local/share/rbdoom3bfg/base
/home/biel/games/doom/RBdoom3BFG/base
_common.resources
_ordered.resources
_sound_pc.resources
_sound_pc_en.resources
maps/admin.resources
maps/alphalabs1.resources
maps/alphalabs2.resources
maps/alphalabs3.resources
maps/alphalabs4.resources
maps/caverns1.resources
maps/caverns2.resources
maps/comm1.resources
maps/commoutside.resources
maps/cpu.resources
maps/cpuboss.resources
maps/d3ctf1.resources
maps/d3ctf2.resources
maps/d3ctf3.resources
maps/d3ctf4.resources
maps/d3dm1.resources
maps/d3dm2.resources
maps/d3dm3.resources
maps/d3dm4.resources
maps/d3dm5.resources
maps/d3xpdm1.resources
maps/d3xpdm2.resources
maps/d3xpdm3.resources
maps/d3xpdm4.resources
maps/delta1.resources
maps/delta2a.resources
maps/delta2b.resources
maps/delta3.resources
maps/delta4.resources
maps/delta5.resources
maps/deltax.resources
maps/enpro.resources
maps/erebus1.resources
maps/erebus2.resources
maps/erebus3.resources
maps/erebus4.resources
maps/erebus5.resources
maps/erebus6.resources
maps/hell.resources
maps/hell1.resources
maps/hellhole.resources
maps/le_enpro1.resources
maps/le_enpro2.resources
maps/le_exis1.resources
maps/le_exis2.resources
maps/le_hell.resources
maps/le_hell_post.resources
maps/le_underground.resources
maps/le_underground2.resources
maps/mars_city1.resources
maps/mars_city2.resources
maps/mc_underground.resources
maps/monorail.resources
maps/phobos1.resources
maps/phobos2.resources
maps/phobos3.resources
maps/phobos4.resources
maps/recycling1.resources
maps/recycling2.resources
maps/site3.resources
file system initialized.
--------------------------------------
WARNING: Unable to open resource file maps/_startup.resources
----- Initializing Decls -----
------------------------------
Couldn't open journal files
[New Thread 0x7fffead3e700 (LWP 4627)]
[New Thread 0x7fffea53d700 (LWP 4628)]
/proc/cpuinfo CPU processors: 4
/proc/cpuinfo CPU logical cores: 8
execing default.cfg
execing D3BFGConfig.cfg
couldn't exec autoexec.cfg
[New Thread 0x7fffe32ad700 (LWP 4630)]
[New Thread 0x7fffe2957700 (LWP 4631)]
[New Thread 0x7fffe2156700 (LWP 4632)]
[New Thread 0x7fffe1955700 (LWP 4633)]
[New Thread 0x7fffe1154700 (LWP 4634)]
[New Thread 0x7fffe0953700 (LWP 4635)]
[New Thread 0x7fffcbfff700 (LWP 4636)]
[New Thread 0x7fffcb7fe700 (LWP 4637)]
[New Thread 0x7fffcaffd700 (LWP 4638)]
[New Thread 0x7fffca7fc700 (LWP 4639)]
[New Thread 0x7fffc9ffb700 (LWP 4640)]
[New Thread 0x7fffc97fa700 (LWP 4641)]
[New Thread 0x7fffc8ff9700 (LWP 4642)]
[New Thread 0x7fffa7fff700 (LWP 4643)]
[New Thread 0x7fffa77fe700 (LWP 4644)]
[New Thread 0x7fffa6ffd700 (LWP 4645)]
[Thread 0x7fffa6ffd700 (LWP 4645) exited]
[New Thread 0x7fffa6ffd700 (LWP 4646)]
[Thread 0x7fffa6ffd700 (LWP 4646) exited]
Initializing Vulkan subsystem
Using 8 color bits, 24 depth, 8 stencil display
----- Initializing Vulkan driver -----
Creating Vulkan Instance...
Enumerating physical devices and their properties...
[New Thread 0x7fffa6ffd700 (LWP 4650)]
[New Thread 0x7fffa58c9700 (LWP 4651)]
[New Thread 0x7fffa50c8700 (LWP 4652)]
[New Thread 0x7fffa48c7700 (LWP 4653)]
found 1 devices
Iterating over gpu 0
have gpuInfo_t ref at 0x5555594ab910
set gpu.device
Getting queue family props...
Getting available vulkan extensions...
Found device[0] Vendor: AMD
Selecting physical device...
Selected device 'AMD RADV RAVEN (LLVM 10.0.0)'
Device[0] : Vendor: AMD
Creating logical device and queues...
Creating semaphores...
Creating query pool...
Creating command pool...
Creating command buffer...
Creating staging manager...
Creating swapchain...
[New Thread 0x7fff8ffff700 (LWP 4654)]
Creating render targets...
Creating render pass...
Creating pipeline cache...
Creating frame buffers...
----- Initializing Render Shaders -----
----- Initializing Sound System ------
[New Thread 0x7fffa40c6700 (LWP 4655)]
[Thread 0x7fffa40c6700 (LWP 4655) exited]
[New Thread 0x7fff8f538700 (LWP 4656)]
[Thread 0x7fff8f538700 (LWP 4656) exited]
[New Thread 0x7fff8f538700 (LWP 4657)]
[New Thread 0x7fff8ed37700 (LWP 4658)]
[New Thread 0x7fff8eb36700 (LWP 4659)]
Setup OpenAL device and context... Done.
OpenAL vendor: OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version: 1.1 ALSOFT 1.19.1
OpenAL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFTX_events AL_SOFTX_filter_gain_ex AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize
classicmusic/gravis.cfg: No such file or directory
sound system initialized.
--------------------------------------
------- Initializing renderSystem --------
Binarize File: '_default' - reason 'generated image'
Binarize File: '_white' - reason 'generated image'
Binarize File: '_black' - reason 'generated image'
Binarize File: '_cyan' - reason 'generated image'
Binarize File: '_flat' - reason 'generated image'
Binarize File: '_alphaNotch' - reason 'generated image'
Binarize File: '_fog' - reason 'generated image'
Binarize File: '_fogEnter' - reason 'generated image'
Binarize File: '_noFalloff' - reason 'generated image'
Binarize File: '_quadratic' - reason 'generated image'
Binarize File: '_jitter1' - reason 'generated image'
Binarize File: '_jitter4' - reason 'generated image'
Binarize File: '_jitter16' - reason 'generated image'
Binarize File: '_random256' - reason 'generated image'
Binarize File: '_blueNoise256' - reason 'generated image'
Binarize File: '_heatmap5' - reason 'generated image'
Binarize File: '_heatmap7' - reason 'generated image'
Binarize File: '_grain1' - reason 'generated image'
Binarize File: '_smaaInput' - reason 'generated image'
Binarize File: '_smaaArea' - reason 'generated image'
Binarize File: '_smaaSearch' - reason 'generated image'
Binarize File: '_imguiFont' - reason 'generated image'
Binarize File: '_chromeSpec' - reason 'generated image'
Binarize File: '_plasticSpec' - reason 'generated image'
Binarize File: '_brdfLut' - reason 'generated image'
Binarize File: '_scratch' - reason 'generated image'
Binarize File: '_scratch2' - reason 'generated image'
Binarize File: '_accum' - reason 'generated image'
Binarize File: '_currentRender' - reason 'generated image'
WARNING: Couldn't load cube image: env/testmap_1_amb
WARNING: Couldn't load cube image: env/testmap_1_spec
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
[New Thread 0x7fff8e935700 (LWP 4660)]
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Oct 12 2020
Initializing event system
...540 event definitions
Initializing class hierarchy
...159 classes, 1010880 bytes for event callbacks
Initializing scripts
/proc/cpuinfo CPU frequency: 1296.58 MHz
Compiled '/home/biel/games/doom/RBdoom3BFG/base/script/doom_main.script': 982.0 ms
---------- Compile stats ----------
Memory usage:
Strings: 120, 15840 bytes
Statements: 95386, 3815440 bytes
Functions: 3070, 496728 bytes
Variables: 239712 bytes
Mem used: 6284512 bytes
Static data: 6266520 bytes
Allocated: 8567312 bytes
Thread size: 14064 bytes
...6 aas types
game initialized.
--------------------------------------
Loaded FFMPEG file: 'video/intro/introloop.bik', looping=1512x512, 30.000000 FPS, 12.000000 sec
Binarize File: '_cinematic' - reason 'generated image'
Loaded FFMPEG file: 'video/mars1.bik', looping=0512x512, 30.000000 FPS, 32.166668 sec
Binarize File: '_cinematic' - reason 'generated image'
Loaded FFMPEG file: 'video/mars_rotation.bik', looping=11567x406, 30.000000 FPS, 100.000000 sec
Binarize File: '_cinematic' - reason 'generated image'
----- idRenderModelManagerLocal::EndLevelLoad -----
0 models purged from previous level, 3 models kept.
---------------------------------------------------
----- idImageManager::EndLevelLoad -----
30 images loaded in 0.0 seconds
----------------------------------------
----- idSoundSystemLocal::EndLevelLoad -----
7 sounds loaded in 0.1 seconds
----------------------------------------
------------- Warnings ---------------
during DOOM 3: BFG Edition initialization...
WARNING: Unable to open resource file maps/_startup.resources
WARNING: Couldn't load cube image: env/testmap_1_amb
WARNING: Couldn't load cube image: env/testmap_1_spec
3 warnings
Preloading images...
00362 images preloaded ( or were already loaded ) in 0.1 seconds
----------------------------------------
00259 sounds preloaded in 0.2 seconds
----------------------------------------
WARNING: Couldn't load image: _doomclassic : _doomclassic#__0200
--- Common Initialization Complete ---
QA Timing IIS: 007404ms
WARNING: terminal type 'xterm-256color' is unknown. terminal support may not work correctly
terminal support enabled ( use +set in_tty 0 to disabled )
pid: 4623
WARNING: unknown event 770
]reload
reloadanims
reloadScript
reloadModels
reloadImages
reloadSurface
reloadGuis
reloadShaders
reloadDecls
reloadLanguage
reloadScript2
]reloadShaders
Thread 1 "RBDoom3BFG.vk" received signal SIGSEGV, Segmentation fault.
0x00007fffa5989798 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
(gdb) continue
Continuing.
signal caught: Segmentation fault
si_code 1
Trying to exit gracefully..
session->GetSaveGameManager().CancelToTerminate();
soundSystem->StopAllSounds();
Stop();
--------- Game Map Shutdown ----------
--------------------------------------
CleanupShell();
delete loadGUI;
ImGuiHook::Destroy();
delete renderWorld;
delete soundWorld;
delete menuSoundWorld;
session->ShutdownSoundRelatedSystems();
session->Shutdown();
game->Leaderboards_Shutdown();
uiManager->Shutdown();
soundSystem->Shutdown();
[Thread 0x7fff8eb36700 (LWP 4659) exited]
[Thread 0x7fff8ed37700 (LWP 4658) exited]
[Thread 0x7fff8f538700 (LWP 4657) exited]
usercmdGen->Shutdown();
eventLoop->Shutdown();
declManager->Shutdown();
renderSystem->Shutdown();
idRenderSystem::Shutdown()
Sys_ShutdownInput: SDL joystick not initialized. Nothing to close.
Thread 1 "RBDoom3BFG.vk" received signal SIGSEGV, Segmentation fault.
0x0000555555aae396 in idBufferObject::IsMapped (this=0x0) at idlib/../renderer/BufferObject.h:97
97 idlib/../renderer/BufferObject.h: No such file or directory.
(gdb) quit
This should be fixed with https://github.com/RobertBeckebans/RBDOOM-3-BFG/commit/1115feefa789105fbb376f15b1a716dc3869c72a
You can try it by git checkout 487-vulkan-crashfix compiling the engine and start it with +set r_useHDR 0 +set r_usePBR 0.
The new PBR IBL stuff is still broken but the rest should run again.
it builds and enters the engine, but as I enter any map I get a computer crash, I have to reboot, I can't post a GDB back trace with a computer crash, sorry, how could I help you with that crash?
I tried this on Kubuntu 20.10 with the latest Nvidia driver. It only crashes when I try to load the map and it can't find the environment probes and passes the 2D texture default to the sampler cube bindings. You can avoid that by starting the engine with +set r_usePBR 0.
I already have r_usePBR 0 and r_useHDR 0 and it still crashes the computer, i think it crashes after drawing (or attempting to draw the first frames ) I get to see the screen turn black after completing a level load, this is the game screen, the rest of the OS windows is still on, so i think the system crashes when the games attempts to draw the first frame. I'm on AMD Vega integrated hardware.
in OpenGL the game loads fine but on vulkan the game crashes when rendering the first frames:
I marked the two segfault messages