Open alexamy opened 2 years ago
ERROR: FATAL: Index p_index = 1 is out of bounds (size() = 1).
at: get (./core/cowdata.h:156)
================================================================
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v3.5.beta.custom_build (cec7fc4ffeba4de992436ed9c7f8fe428c22a6b1)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] godots() [0x185be7a] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/x11/crash_handler_x11.cpp:55)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fd32215f520] (??:0)
[3] CowData<RasterizerStorageGLES3::RenderTarget::Effects::MipMaps::Size>::get(int) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/cowdata.h:156 (discriminator 7))
[4] Vector<RasterizerStorageGLES3::RenderTarget::Effects::MipMaps::Size>::operator[](int) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/vector.h:87)
[5] RasterizerSceneGLES3::_blur_effect_buffer() (/home/runner/work/GodotBuilds/GodotBuilds/godot/drivers/gles3/rasterizer_scene_gles3.cpp:3215 (discriminator 8))
[6] RasterizerSceneGLES3::_render_mrts(RasterizerSceneGLES3::Environment*, CameraMatrix const&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/drivers/gles3/rasterizer_scene_gles3.cpp:3468)
[7] RasterizerSceneGLES3::render_scene(Transform const&, CameraMatrix const&, int, bool, RasterizerScene::InstanceBase**, int, RID*, int, RID*, int, RID, RID, RID, RID, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/drivers/gles3/rasterizer_scene_gles3.cpp:4496)
[8] VisualServerScene::_render_scene(Transform, CameraMatrix const&, int, bool, RID, RID, RID, RID, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_scene.cpp:3233)
[9] VisualServerScene::render_camera(RID, RID, Vector2, RID) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_scene.cpp:2810 (discriminator 2))
[10] VisualServerViewport::_draw_3d(VisualServerViewport::Viewport*, ARVRInterface::Eyes) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_viewport.cpp:68)
[11] VisualServerViewport::_draw_viewport(VisualServerViewport::Viewport*, ARVRInterface::Eyes) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_viewport.cpp:109)
[12] VisualServerViewport::draw_viewports() (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_viewport.cpp:351)
[13] VisualServerRaster::draw(bool, double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_raster.cpp:117 (discriminator 4))
[14] VisualServerWrapMT::draw(bool, double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/servers/visual/visual_server_wrap_mt.cpp:122)
[15] Main::iteration() (/home/runner/work/GodotBuilds/GodotBuilds/godot/main/main.cpp:2292)
[16] OS_X11::run() (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/x11/os_x11.cpp:3835)
[17] godots(main+0x343) [0x1852109] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/x11/godot_x11.cpp:57)
[18] /lib/x86_64-linux-gnu/libc.so.6(+0x29fd0) [0x7fd322146fd0] (??:0)
[19] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7d) [0x7fd32214707d] (??:0)
[20] godots(_start+0x2e) [0x1851d0e] (??:?)
-- END OF BACKTRACE --
================================================================
I'd like to submit a fix. I'm not familiar with how the blur algorithm should work, I can see references to mip_maps[1]
as well as mip_maps[0]
and mip_maps[0].sizes[i + 1]
. Therefore, I wasn't sure where to add a modification. The code references a mipmap size that doesn't exist. I've added a check just to the line where the actual i + 1
is used. If necessary, I can instead reduce the number of iterations (so i
will never reach a wrong value). Let me know which one is better.
Godot version
v3.4.3.stable.arch_linux
System information
Arch Linux, GLES3, Nvidia GeForce GTX 1660 Super
Issue description
Expected: Setting nested viewport size to 2 doesnt crash the engine.
Actual: Setting nested viewport size to 2 crashes the engine with the following error:
Steps to reproduce
player
sceneViewport
Minimal reproduction project
ViewportCameraBugMinimal.zip