Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightmap GI crashes on blitting albedo and emmision, on larger meshes (tested 250m or larger) #76613

Closed
Bartusew opened this issue Apr 30, 2023 · 2 comments

Comments

@Bartusew
Copy link

Godot version

4.0.2

System information

Tested on intel HD graphics 615 and Nvidia 1660 ti & 3050. Windows 10 & 11. CPU: 1. intel core i5-3570 2.intel core i7y75 3. intel core i9-11900k, RAM: 16GB - 32GB,graphics backend: forward +

Issue description

When mesh is large enough and the baking proccess tries to "Blitting albedo and emmision" makes Godot crash.
image

(mesh was generated by using outline mesh option from BoxMesh of size(500,500,500))
image

lights doesn't make any difference
image

Steps to reproduce

Create a mesh instance node with BoxMesh of size (250,250,250) or larger (not sure where it starts but the smallest tested size is 250m)

Create ArrayMesh

Create Lightmap GI

click bake

Minimal reproduction project

New_Game_Project6666.zip

@adamscott
Copy link
Member

I reproduced the crash using the MRP on my Ubuntu Linux 22.04 laptop with a eGPU (Radeon RX Vega 64). (thanks for the MRP, by the way!)

Here's the backtrace:

Done baking lightmaps in 00:00:00.
ERROR: Condition "p_size < 0" is true. Returning: ERR_INVALID_PARAMETER
   at: resize (./core/templates/cowdata.h:262)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.dev.custom_build (9f12e7b52d944281a39b7d3a33de6700c76cc23a)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f076e842520] (??:0)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x1a11ca) [0x7f076e9a11ca] (??:0)
[3] Image::initialize_data(int, int, bool, Image::Format) (/home/adam/dev/builds/godot/core/io/image.cpp:2170)
[4] Image::create_empty(int, int, bool, Image::Format) (/home/adam/dev/builds/godot/core/io/image.cpp:2138)
[5] LightmapperRD::_blit_meshes_into_atlas(int, Vector<Ref<Image> >&, Vector<Ref<Image> >&, AABB&, Vector2i&, int&, bool (*)(float, String const&, void*, bool), void*) (/home/adam/dev/builds/godot/modules/lightmapper_rd/lightmapper_rd.cpp:258)
[6] LightmapperRD::bake(Lightmapper::BakeQuality, bool, int, float, int, bool, Lightmapper::GenerateProbes, Ref<Image> const&, Basis const&, bool (*)(float, String const&, void*, bool), void*, float) (/home/adam/dev/builds/godot/modules/lightmapper_rd/lightmapper_rd.cpp:680)
[7] LightmapGI::bake(Node*, String, bool (*)(float, String const&, void*, bool), void*) (/home/adam/dev/builds/godot/scene/3d/lightmap_gi.cpp:1082)
[8] LightmapGIEditorPlugin::_bake_select_file(String const&) (/home/adam/dev/builds/godot/editor/plugins/lightmap_gi_editor_plugin.cpp:70)
[9] void call_with_variant_args_helper<LightmapGIEditorPlugin, String const&, 0ul>(LightmapGIEditorPlugin*, void (LightmapGIEditorPlugin::*)(String const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:293)
[10] void call_with_variant_args<LightmapGIEditorPlugin, String const&>(LightmapGIEditorPlugin*, void (LightmapGIEditorPlugin::*)(String const&), Variant const**, int, Callable::CallError&) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:408)
[11] CallableCustomMethodPointer<LightmapGIEditorPlugin, String const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/./core/object/callable_method_pointer.h:105)
[12] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/core/variant/callable.cpp:51)
[13] Object::emit_signalp(StringName const&, Variant const**, int) (/home/adam/dev/builds/godot/core/object/object.cpp:1055)
[14] Error Object::emit_signal<String>(StringName const&, String) (/home/adam/dev/builds/godot/./core/object/object.h:868)
[15] EditorFileDialog::_action_pressed() (/home/adam/dev/builds/godot/editor/gui/editor_file_dialog.cpp:503)
[16] void call_with_variant_args_helper<EditorFileDialog>(EditorFileDialog*, void (EditorFileDialog::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:298)
[17] void call_with_variant_args<EditorFileDialog>(EditorFileDialog*, void (EditorFileDialog::*)(), Variant const**, int, Callable::CallError&) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:408)
[18] CallableCustomMethodPointer<EditorFileDialog>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/./core/object/callable_method_pointer.h:105)
[19] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/core/variant/callable.cpp:51)
[20] Object::emit_signalp(StringName const&, Variant const**, int) (/home/adam/dev/builds/godot/core/object/object.cpp:1055)
[21] Error Object::emit_signal<>(StringName const&) (/home/adam/dev/builds/godot/./core/object/object.h:868)
[22] AcceptDialog::_ok_pressed() (/home/adam/dev/builds/godot/scene/gui/dialogs.cpp:128)
[23] void call_with_variant_args_helper<AcceptDialog>(AcceptDialog*, void (AcceptDialog::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:298)
[24] void call_with_variant_args<AcceptDialog>(AcceptDialog*, void (AcceptDialog::*)(), Variant const**, int, Callable::CallError&) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:408)
[25] CallableCustomMethodPointer<AcceptDialog>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/./core/object/callable_method_pointer.h:105)
[26] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/core/variant/callable.cpp:51)
[27] Object::emit_signalp(StringName const&, Variant const**, int) (/home/adam/dev/builds/godot/core/object/object.cpp:1055)
[28] Error Object::emit_signal<>(StringName const&) (/home/adam/dev/builds/godot/./core/object/object.h:868)
[29] BaseButton::_pressed() (/home/adam/dev/builds/godot/scene/gui/base_button.cpp:139)
[30] BaseButton::on_action_event(Ref<InputEvent>) (??:?)
[31] BaseButton::gui_input(Ref<InputEvent> const&) (/home/adam/dev/builds/godot/scene/gui/base_button.cpp:69)
[32] Control::_call_gui_input(Ref<InputEvent> const&) (/home/adam/dev/builds/godot/scene/gui/control.cpp:1752)
[33] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/adam/dev/builds/godot/scene/main/viewport.cpp:1433)
[34] Viewport::_gui_input_event(Ref<InputEvent>) (/home/adam/dev/builds/godot/scene/main/viewport.cpp:1703)
[35] Viewport::push_input(Ref<InputEvent> const&, bool) (/home/adam/dev/builds/godot/scene/main/viewport.cpp:2862)
[36] Window::_window_input(Ref<InputEvent> const&) (??:?)
[37] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:293)
[38] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (/home/adam/dev/builds/godot/./core/variant/binder_common.h:408)
[39] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/./core/object/callable_method_pointer.h:105)
[40] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/adam/dev/builds/godot/core/variant/callable.cpp:51)
[41] DisplayServerX11::_dispatch_input_event(Ref<InputEvent> const&) (/home/adam/dev/builds/godot/platform/linuxbsd/x11/display_server_x11.cpp:3593)
[42] DisplayServerX11::_dispatch_input_events(Ref<InputEvent> const&) (/home/adam/dev/builds/godot/platform/linuxbsd/x11/display_server_x11.cpp:3565)
[43] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/adam/dev/builds/godot/core/input/input.cpp:690)
[44] Input::flush_buffered_events() (/home/adam/dev/builds/godot/core/input/input.cpp:940)
[45] DisplayServerX11::process_events() (/home/adam/dev/builds/godot/platform/linuxbsd/x11/display_server_x11.cpp:4661)
[46] OS_LinuxBSD::run() (/home/adam/dev/builds/godot/platform/linuxbsd/os_linuxbsd.cpp:885)
[47] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm(main+0x1fe) [0x5605aed248ae] (/home/adam/dev/builds/godot/platform/linuxbsd/godot_linuxbsd.cpp:73)
[48] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f076e829d90] (??:0)
[49] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f076e829e40] (??:0)
[50] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm(_start+0x25) [0x5605aed245e5] (??:?)
-- END OF BACKTRACE --
================================================================
fish: Job 1, './bin/godot.linuxbsd.editor.dev…' terminated by signal SIGABRT (Abandon)

@Calinou
Copy link
Member

Calinou commented Apr 30, 2023

As a workaround, increase the lightmap texel size in the PrimitiveMesh's inspector properties to make the lightmap less detailed.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants