godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.49k stars 19.27k forks source link

Crash on project start on Nouveau driver (OpenGL) and llvmpipe (Vulkan) #74172

Closed HyperSilver69 closed 2 days ago

HyperSilver69 commented 1 year ago

Godot version

4.0-stable

System information

XUbuntu, Macbook Pro mid-2011

Issue description

Whenever I try to open a project in 4.0, it just crashes almost instantly.

host@host-MacBookPro:~/Documents$ ./Godot_v4.0-stable_linux.x86_64
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
OpenGL API 3.3 (Core Profile) Mesa 22.2.5 - Compatibility - Using Device: nouveau - NVAF

Editing project: /home/host/New Game Project
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: Unknown - llvmpipe (LLVM 15.0.6, 128 bits)
host@host-MacBookPro:~/Documents$  
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:70)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.stable.official (92bee43adba8d2401ef40e2480e53087bcb1eaf1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f3492c42520] (??:0)
[2] llvm::CmpInst::Create(llvm::Instruction::OtherOps, llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&, llvm::BasicBlock*) (??:0)
-- END OF BACKTRACE --
================================================================

https://user-images.githubusercontent.com/91153148/222231184-0071d326-ac4b-46bc-989e-1206ca012124.mp4

Steps to reproduce

Open a project in 4.0-stable

Minimal reproduction project

.

Calinou commented 1 year ago

Try creating a project with the Compatibility rendering method instead of Forward+ or Mobile. The Nouveau driver doesn't support Vulkan, and the software Vulkan implementation (llvmpipe) is too slow to be usable for actual development.

If you converted an existing project to Godot 4, see my comment in https://github.com/godotengine/godot/issues/74159 to change it to use the Compatibility renderer.

HyperSilver69 commented 1 year ago

Try creating a project with the Compatibility rendering method instead of Forward+ or Mobile. The Nouveau driver doesn't support Vulkan, and the software Vulkan implementation (llvmpipe) is too slow to be usable for actual development.

If you converted an existing project to Godot 4, see my comment in https://github.com/godotengine/godot/issues/74159 to change it to use the Compatibility renderer.

Is there any reason that Forward+ did work on 3.5.1 but not in 4.0?

arkology commented 1 year ago

@HyperSilver69 because 3.x doesn't have Vulcan renderer. Compatibility renderer in 4.0 uses OpenGL.

HyperSilver69 commented 1 year ago

Sorry for reopening the issue, however it seemed that the stated fix did not in fact fix anything. Using Mobile didn't change anything, still crashing and no difference in the terminal, however when I tried using performance it also crashed but provided this instead:

Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
OpenGL API 3.3 (Core Profile) Mesa 22.2.5 - Compatibility - Using Device: nouveau - NVAF

Editing project: /home/host/4.0
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
Vulkan API 1.3.224 - Forward Mobile - Using Vulkan Device #0: Unknown - llvmpipe (LLVM 15.0.6, 128 bits)
host@host-MacBookPro:~/Documents$  
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:70)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.stable.official (92bee43adba8d2401ef40e2480e53087bcb1eaf1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f5cc6c42520] (??:0)
[2] llvm::CmpInst::Create(llvm::Instruction::OtherOps, llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&, llvm::BasicBlock*) (??:0)
-- END OF BACKTRACE --
================================================================
host@host-MacBookPro:~/Documents$ ./Godot_v4.0-stable_linux.x86_64
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
OpenGL API 3.3 (Core Profile) Mesa 22.2.5 - Compatibility - Using Device: nouveau - NVAF

Editing project: /home/host/da
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
host@host-MacBookPro:~/Documents$ OpenGL API 3.3 (Core Profile) Mesa 22.2.5 - Compatibility - Using Device: nouveau - NVAF

WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:70)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.stable.official (92bee43adba8d2401ef40e2480e53087bcb1eaf1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f34c6842520] (??:0)
[2] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xc78129) [0x7f34c1478129] (??:0)
[3] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xd481d5) [0x7f34c15481d5] (??:0)
[4] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xc82615) [0x7f34c1482615] (??:0)
[5] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xc82727) [0x7f34c1482727] (??:0)
[6] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xd3e994) [0x7f34c153e994] (??:0)
[7] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0xc8147b) [0x7f34c148147b] (??:0)
[8] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x9590ae) [0x7f34c11590ae] (??:0)
[9] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x95f12a) [0x7f34c115f12a] (??:0)
[10] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x1947ad) [0x7f34c09947ad] (??:0)
[11] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x1950be) [0x7f34c09950be] (??:0)
[12] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x19572c) [0x7f34c099572c] (??:0)
[13] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x195c56) [0x7f34c0995c56] (??:0)
[14] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x342242) [0x7f34c0b42242] (??:0)
[15] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x33f0f1) [0x7f34c0b3f0f1] (??:0)
[16] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x32cfac) [0x7f34c0b2cfac] (??:0)
[17] /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so(+0x30e23f) [0x7f34c0b0e23f] (??:0)
[18] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1b10538] (??:0)
[19] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1b10f60] (??:0)
[20] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1b11c47] (??:0)
[21] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1b310e8] (??:0)
[22] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x4137998] (??:0)
[23] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x41412aa] (??:0)
[24] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x3a6f192] (??:0)
[25] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x3a740cb] (??:0)
[26] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x3a8984a] (??:0)
[27] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x3b5e8c2] (??:0)
[28] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0xec1616] (??:0)
[29] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1ec3b73] (??:0)
[30] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1c271af] (??:0)
[31] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1c2c242] (??:0)
[32] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x1c2dd85] (??:0)
[33] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x4568594] (??:0)
[34] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x2b9a3ee] (??:0)
[35] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0x2bd12a1] (??:0)
[36] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0xec07db] (??:0)
[37] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0xe027f3] (??:0)
[38] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f34c6829d90] (??:0)
[39] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f34c6829e40] (??:0)
[40] /home/host/Documents/Godot_v4.0-stable_linux.x86_64() [0xe2286e] (??:0)
-- END OF BACKTRACE --
================================================================
HyperSilver69 commented 1 year ago

Forgot to reopen

Calinou commented 1 year ago

The crash is in the Nouveau driver. Do you have a way to install the proprietary NVIDIA driver? I'd recommend doing this as Nouveau is home to a lot of regressions, as it's the fruit of reverse engineering.

akien-mga commented 3 days ago

The crash is in the Nouveau driver. Do you have a way to install the proprietary NVIDIA driver? I'd recommend doing this as Nouveau is home to a lot of regressions, as it's the fruit of reverse engineering.

Note that it's also crash in llvmpipe when using Vulkan.


My recommendation for affected users would be to upgrade to a much more recent distro release that includes recent Mesa (e.g. Ubuntu 24.04).

If the GL Compatibility backend still crashes mentioning nouveau, then this should be reported as a bug to upstream Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/issues

If the Vulkan backend still crashes with some llvm symbols, it means llvmpipe is still broken and this likewise should be reported to upstream Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/issues

On our end, we should look into the possibility to detect these bad combinations of old GPU and Mesa versions and outright refuse to run Godot, without a segfault.

akien-mga commented 3 days ago

Also related: #82435.

akien-mga commented 2 days ago

Actually let's close this as duplicate of #82435, since that's what the original report was.

@HyperSilver69 If you still have a crash of the GL Compatibility backend involving nouveau_dri.so in the stacktrace, could you open a new issue to keep track of that one specifically?

The other crash you had when trying to use Forward+ or Mobile backends is tracked in #82435.