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

Crash by division by zero in render_forward_clustered.cpp #73431

Closed
qarmin opened this issue Feb 16, 2023 · 2 comments
Closed

Crash by division by zero in render_forward_clustered.cpp #73431

qarmin opened this issue Feb 16, 2023 · 2 comments

Comments

@qarmin
Copy link
Contributor

qarmin commented Feb 16, 2023

Godot version

4.0 8c7b98d

System information

Ubuntu 22.10 - AMD RX 470, Gnome shell 43 X11

Issue description

ERROR: reflection probe has no reflection atlas! Bug?
   at: reflection_probe_instance_get_cluster_builder (servers/rendering/renderer_rd/storage_rd/light_storage.cpp:1607)
ERROR: Condition "!atlas" is true. Returning: 0
   at: reflection_probe_instance_get_resolution (servers/rendering/renderer_rd/storage_rd/light_storage.cpp:1579)
ERROR: Condition "!atlas" is true. Returning: RID()
   at: reflection_probe_instance_get_framebuffer (servers/rendering/renderer_rd/storage_rd/light_storage.cpp:1589)
ERROR: Condition "!atlas" is true. Returning: RID()
   at: reflection_probe_instance_get_depth_framebuffer (servers/rendering/renderer_rd/storage_rd/light_storage.cpp:1599)
core/math/vector2.h:220:31: runtime error: division by zero
core/math/vector2.h:220:19: runtime error: division by zero
servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp:624:61: runtime error: division by zero

================================================================
handle_crash: Program crashed with signal 8
Engine version: Godot Engine v4.0.rc.custom_build (8c7b98d4526c6ba66d7f1636abb71ccbe54727c6)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] godot4s() [0x27be19a] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/crash_handler_linuxbsd.cpp:57)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x3bcf0) [0x7fb325e3bcf0] (??:0)
[3] RendererSceneRenderImplementation::RenderForwardClustered::_setup_environment(RenderDataRD const*, bool, Vector2i const&, bool, Color const&, bool, bool, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp:624 (discriminator 3))
[4] RendererSceneRenderImplementation::RenderForwardClustered::_render_scene(RenderDataRD*, Color const&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp:1675)
[5] RendererSceneRenderRD::render_scene(Ref<RenderSceneBuffers> const&, RendererSceneRender::CameraData const*, RendererSceneRender::CameraData const*, PagedArray<RenderGeometryInstance*> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, RID, RID, RID, RID, RID, RID, int, float, RendererSceneRender::RenderShadowData const*, int, RendererSceneRender::RenderSDFGIData const*, int, RendererSceneRender::RenderSDFGIUpdateData const*, RenderingMethod::RenderInfo*) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp:1037)
[6] RendererSceneCull::_render_scene(RendererSceneRender::CameraData const*, Ref<RenderSceneBuffers> const&, RID, RID, unsigned int, RID, RID, RID, RID, int, float, bool, RenderingMethod::RenderInfo*) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_scene_cull.cpp:3316 (discriminator 4))
[7] RendererSceneCull::_render_reflection_probe_step(RendererSceneCull::Instance*, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_scene_cull.cpp:3442 (discriminator 2))
[8] RendererSceneCull::render_probes() (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/renderer_scene_cull.cpp:3470)
[9] RenderingServerDefault::_draw(bool, double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/rendering_server_default.cpp:91)
[10] RenderingServerDefault::draw(bool, double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/rendering/rendering_server_default.cpp:397)
[11] Main::iteration() (/home/runner/work/GodotBuilds/GodotBuilds/godot/main/main.cpp:3175)
[12] OS_LinuxBSD::run() (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/os_linuxbsd.cpp:880)
[13] godot4s(main+0x58f) [0x27bdb45] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/godot_linuxbsd.cpp:75)
[14] /lib/x86_64-linux-gnu/libc.so.6(+0x23510) [0x7fb325e23510] (??:0)
[15] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7fb325e235c9] (??:0)
[16] godot4s(_start+0x25) [0x27bd4f5] (??:?)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

ReparentingDeleting.tscn not contains any logic expect randomly moving/reparenting/deleting nodes, so not sure what exactly caused this crash or how to find minimal project to reproduce

uint32_t cluster_screen_width = (p_screen_size.width - 1) / p_render_data->cluster_size + 1;
uint32_t cluster_screen_height = (p_screen_size.height - 1) / p_render_data->cluster_size + 1;
scene_state.ubo.cluster_type_size = cluster_screen_width * cluster_screen_height * (scene_state.ubo.max_cluster_element_count_div_32 + 32);
scene_state.ubo.cluster_width = cluster_screen_width;

Steps to reproduce

Minimal reproduction project

https://github.com/qarmin/Qarminer

@AThousandShips
Copy link
Member

This might have been fixed in:

Which changed these specific lines, please confirm

@qarmin
Copy link
Contributor Author

qarmin commented Jun 8, 2024

Cannot reproduce problem anymore

@qarmin qarmin closed this as completed Jun 8, 2024
@qarmin qarmin modified the milestones: 4.x, 4.3 Jun 8, 2024
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