godotengine / godotengine/godot

Lightmap bake crashes at direct light calculation

Open
#106,975 5 comments 1 reaction 0 assignees View on GitHub
bug confirmed crash topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot Engine v4.5.dev.custom_build.45fc515ae

### System information

Ubuntu 24.04 and Windows 11. Nvidia 2060

### Issue description

Lightmap bakes crashes at direct light calculation. This happens using the MRP with `quality` set to `high`. Large amount of rays causes the error

```
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.5.dev.custom_build (45fc515ae3574e9c1f9deacaa6960dec68a7d38b)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42990) [0x7b704f042990] (??:0)
[2] RenderingDeviceDriverVulkan::command_queue_execute_and_present(RenderingDeviceDriver::CommandQueueID, VectorView, VectorView, VectorView, RenderingDeviceDriver::FenceID, VectorView) (/home/juan/dev/godot/drivers/vulkan/rendering_device_driver_vulkan.cpp:2724 (discriminator 2))
[3] RenderingDevice::execute_chained_cmds(bool, RenderingDeviceDriver::FenceID, RenderingDeviceDriver::SemaphoreID) (/home/juan/dev/godot/servers/rendering/rendering_device.cpp:6499 (discriminator 3))
[4] RenderingDevice::_execute_frame(bool) (/home/juan/dev/godot/servers/rendering/rendering_device.cpp:6526)
[5] RenderingDevice::submit() (/home/juan/dev/godot/servers/rendering/rendering_device.cpp:6272)
[6] LightmapperRD::bake(Lightmapper::BakeQuality, bool, float, int, int, float, float, int, bool, bool, bool, Lightmapper::GenerateProbes, Ref const&, Basis const&, bool (*)(float, String const&, void*, bool), void*, float, float) (/home/juan/dev/godot/modules/lightmapper_rd/lightmapper_rd.cpp:1750)
[7] LightmapGI::bake(Node*, String, bool (*)(float, String const&, void*, bool), void*) (/home/juan/dev/godot/scene/3d/lightmap_gi.cpp:1268)
[8] LightmapGIEditorPlugin::_bake_select_file(String const&) (/home/juan/dev/godot/editor/plugins/lightmap_gi_editor_plugin.cpp:73 (discriminator 2))
[9] LightmapGIEditorPlugin::_bake() (/home/juan/dev/godot/editor/plugins/lightmap_gi_editor_plugin.cpp:129 (discriminator 2))
[10] void call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/juan/dev/godot/core/variant/binder_common.h:228)
[11] void call_with_variant_args_dv<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, int, Callable::CallError&, Vector const&) (/home/juan/dev/godot/core/variant/binder_common.h:371)
[12] MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (/home/juan/dev/godot/core/object/method_bind.h:337 (discriminator 1))
[13] Object::callp(StringName const&, Variant const**, int, Callable::CallError&) (/home/juan/dev/godot/core/object/object.cpp:872 (discriminator 1))
[14] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/juan/dev/godot/core/variant/callable.cpp:69 (discriminator 1))
[15] Object::emit_signalp(StringName const&, Variant const**, int) (/home/juan/dev/godot/core/object/object.cpp:1288)
[16] Node::emit_signalp(StringName const&, Variant const**, int) (/home/juan/dev/godot/scene/main/node.cpp:4291)
[17] Error Object::emit_signal<>(StringName const&) (/home/juan/dev/godot/core/object/object.h:930)
[18] BaseButton::_pressed() (/home/juan/dev/godot/scene/gui/base_button.cpp:195)
[19] BaseButton::on_action_event(Ref) (/home/juan/dev/godot/scene/gui/base_button.cpp:239)
[20] BaseButton::gui_input(Ref const&) (/home/juan/dev/godot/scene/gui/base_button.cpp:69 (discriminator 2))
[21] Control::_call_gui_input(Ref const&) (/home/juan/dev/godot/scene/gui/control.cpp:1865)
[22] Viewport::_gui_call_input(Control*, Ref const&) (/home/juan/dev/godot/scene/main/viewport.cpp:1728)
[23] Viewport::_gui_input_event(Ref) (/home/juan/dev/godot/scene/main/viewport.cpp:1994 (discriminator 2))
[24] Viewport::push_input(Ref const&, bool) (/home/juan/dev/godot/scene/main/viewport.cpp:3426 (discriminator 2))
[25] Window::_window_input(Ref const&) (/home/juan/dev/godot/scene/main/window.cpp:1837)
[26] void call_with_variant_args_helper const&, 0ul>(Window*, void (Window::*)(Ref const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/juan/dev/godot/core/variant/binder_common.h:223 (discriminator 2))
[27] void call_with_variant_args const&>(Window*, void (Window::*)(Ref const&), Variant const**, int, Callable::CallError&) (/home/juan/dev/godot/core/variant/binder_common.h:338)
[28] CallableCustomMethodPointer const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/juan/dev/godot/core/object/callable_method_pointer.h:107)
[29] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/juan/dev/godot/core/variant/callable.cpp:57)
[30] Variant Callable::call >(Ref) const (/home/juan/dev/godot/core/variant/variant.h:951)
[31] DisplayServerX11::_dispatch_input_event(Ref const&) (/home/juan/dev/godot/platform/linuxbsd/x11/display_server_x11.cpp:4393 (discriminator 2))
[32] DisplayServerX11::_dispatch_input_events(Ref const&) (/home/juan/dev/godot/platform/linuxbsd/x11/display_server_x11.cpp:4370)
[33] Input::_parse_input_event_impl(Ref const&, bool) (/home/juan/dev/godot/core/input/input.cpp:903)
[34] Input::flush_buffered_events() (/home/juan/dev/godot/core/input/input.cpp:1184)
[35] DisplayServerX11::process_events() (/home/juan/dev/godot/platform/linuxbsd/x11/display_server_x11.cpp:5548)
[36] OS_LinuxBSD::run() (/home/juan/dev/godot/platform/linuxbsd/os_linuxbsd.cpp:977)
[37] /home/juan/dev/godot/bin/godot.linuxbsd.editor.dev.x86_64(main+0x190) [0x57edfcb495c9] (/home/juan/dev/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)
[38] /lib/x86_64-linux-gnu/libc.so.6(+0x28150) [0x7b704f028150] (??:0)
[39] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7b704f028209] (??:0)
[40] /home/juan/dev/godot/bin/godot.linuxbsd.editor.dev.x86_64(_start+0x25) [0x57edfcb49375] (??:?)
-- END OF C++ BACKTRACE --
```

### Steps to reproduce

Use the Backyard Bistro Scene
Add a Lightmap node
Set it to 1 texel density
Set quality to `high`

### Minimal reproduction project (MRP)

[Backyard Bistro Scene MRP](https://www.dropbox.com/s/m5afh2bh3gsb1aj/LumberyardBistro_Godot4.zip?dl=0)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.