godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.65k stars 1.58k forks source link

3D Graphics Settings demo crash on launch #961

Closed godares79 closed 11 months ago

godares79 commented 11 months ago

Which demo project is affected: 3d/graphics_settings

OS/device including version: Godot Engine v4.1.1.stable.official.bd6af8e0e - https://godotengine.org Vulkan API 1.3.246 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 6900 XT (RADV NAVI21)

Fedora 38 (Workstation edition) Gnome 44.4 Wayland Radeon 6900xt GPU, Driver version: 23.1.7 Ryzen 5 5600x CPU

Issue description: This only happens with the Forward+ or Mobile renderers. The Compatibility renderer does not result in a crash and I am able to run the demo project.

The demo loads into the editor no problem. Upon running the project, two possible behaviours:

  1. (Most common) The demo will briefly display the splash screen then close shortly thereafter. A warning is displayed in the godot debugger:
    W 0:00:00:0047   _load_pipeline_cache: Invalid pipelines cache header.
      <C++ Source>   drivers/vulkan/rendering_device_vulkan.cpp:9028 @ _load_pipeline_cache()

    And I see the following error in my terminal:

    ERROR: Condition "swapchainImageCount != sp_image_count" is true. Returning: ERR_BUG
  2. (Rare) The demo starts to run but never actually moves beyond the splash screen, the splash screen starts freaking out or something, I don't know the proper term (artifacting?), I pasted an image below. It stays this way until I attempt to move the window, at which point it crashes. In addition to the above warning and error, I also get a stack trace in the terminal:

    ERROR: Condition "swapchainImageCount != sp_image_count" is true. Returning: ERR_BUG
       at: _update_swap_chain (drivers/vulkan/vulkan_context.cpp:1980)
    
    ================================================================
    handle_crash: Program crashed with signal 11
    Engine version: Godot Engine v4.1.1.stable.official (bd6af8e0ea69167dd0627f3bd54f9105bda0f8b5)
    Dumping the backtrace. Please include this when reporting the bug to the project developer.
    [1] /lib64/libc.so.6(+0x3dbb0) [0x7f3b14c60bb0] (??:0)
    [2] /usr/lib64/libvulkan_radeon.so(+0x1f63f7) [0x7f3aef9f63f7] (??:0)
    [3] /usr/lib64/libvulkan_radeon.so(+0x1a19f3) [0x7f3aef9a19f3] (??:0)
    [4] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0x4f4f086] (??:0)
    [5] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0x1bc64b3] (??:0)
    [6] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0x1bc8fa1] (??:0)
    [7] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0xeb3e69] (??:0)
    [8] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0xeb70dc] (??:0)
    [9] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0xe46433] (??:0)
    [10] /lib64/libc.so.6(+0x27b8a) [0x7f3b14c4ab8a] (??:0)
    [11] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f3b14c4ac4b] (??:0)
    [12] /home/user1/Godot/Godot_v4.1.1-stable_linux.x86_64() [0xe777ae] (??:0)
    -- END OF BACKTRACE --
    ================================================================

Other notes:

  1. I've tried a bunch of the other 3D demos and haven't encountered this issue with any others.
  2. Running the 3d_scene by itself works fine. The crash also occurs when I try to run the control scene by itself.
  3. It's pretty consistent that I only get the stack trace during the second type of error, but sometimes I see the stack trace with the first type of error.

Screenshots of issue: The screenshot doesn't really show what I'm actually seeing, but you can see some stuff on the bottom right of the window. Typically the entire running project window will look similar to the bottom right.

Screenshot from 2023-09-21 16-49-14

Calinou commented 11 months ago

This is an engine issue, likely fixed by https://github.com/godotengine/godot/pull/80566 (please test that pull request to confirm).

godares79 commented 11 months ago

Confirmed, that PR fixes the crash for both Forward+ and Mobile. Thank you!

Calinou commented 11 months ago

Closing, as this is an engine issue and not an issue with the demo project.