Godot version: 3.2 stable (Edit: tested on 3.2 betas, does not crash in beta1 but crashes in all 3.2 versions starting with beta2)
OS/device including version: Linux Mint 19.3
Issue description: Editor crashes when increasing texture size of a procedural sky
Steps to reproduce: Create new project, open the default environment -> background -> sky, set texture size to anything larger than current setting.
Even if setting texture to smaller size and then back to it's original size it still crashes.
For example changing from default of 1024 -> 256: Ok
Now changing from 256 -> 1024 (or any other size including 512): Crash
Minimal reproduction project: empty new project
Here's the output I got from the crash:
```
OpenGL ES 3.0 Renderer: Radeon RX 570 Series
handle_crash: Program crashed with signal 11
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(+0x3ef20) [0x7f0b4e9acf20] (??:0)
[2] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x17d1d5f) [0x7f0b41bcfd5f] (??:0)
[3] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x166f44b) [0x7f0b41a6d44b] (??:0)
[4] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x1696e4c) [0x7f0b41a94e4c] (??:0)
[5] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x156fe6d) [0x7f0b4196de6d] (??:0)
[6] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x157bd46) [0x7f0b41979d46] (??:0)
[7] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x75327b) [0x7f0b40b5127b] (??:0)
[8] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x22dd6b3] (
[9] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x11fdb19] (
[10] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x25920f6] (??:?)
[11] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0xbe22e3] (??:?)
[12] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x90dcbd] (??:?)
[13] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0xc94d9c] (??:?)
[14] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x187be79] (??:?)
[15] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x292e6a5] (??:?)
[16] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x84877d] (??:?)
[17] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0b4e98fb97] (??:0)
[18] /home/cammymoop/Downloads/godot_3.2/Godot_v3.2-stable_x11.64() [0x855b0e] (??:?)
-- END OF BACKTRACE --```
Is this from a project created in 3.1?
Nevermind. Bad question.
I can't reproduce on Ubuntu 16.04. Godot version 3.2 stable. I tried with sizes up to 4096.
Can you please upload a minimal reproduction project? And please post your device info (CPU, GPU, driver version of possible).
tp.zip Reproduction project is just an empty project from making a new project, heres one I made
GPU is Radeon RX 570
CPU Ryzen 5 2600
I dont know how to tell the driver versions but its amdgpu/amdgpu-pro and here's the package versions


Just tried it on my desktop as well (Windows 10 NVidia GTX 1050) and I couldn't reproduce. :/
Could you try building yourself from master with debug enabled so that we can get a proper backtrace? When it crashes in a debug build those question marks in the backtrace become actual references to functions in the codebase.
Yeah, I'll give that a try, possibly tomorrow
If it helps, @Calinou has made some pre-built debug versions of 3.2 for just this sort of thing:
https://github.com/Calinou/godot-debug-builds/releases
Thanks, yeah here's the backtrace from it crashing using the debug build
OpenGL ES 3.0 Renderer: Radeon RX 570 Series
handle_crash: Program crashed with signal 11
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(+0x3ef20) [0x7f0e1d66bf20] (??:0)
[2] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x17d1d5f) [0x7f0e12208d5f] (??:0)
[3] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x166f44b) [0x7f0e120a644b] (??:0)
[4] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x1696e4c) [0x7f0e120cde4c] (??:0)
[5] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x156fe6d) [0x7f0e11fa6e6d] (??:0)
[6] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x157bd46) [0x7f0e11fb2d46] (??:0)
[7] /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x75327b) [0x7f0e1118a27b] (??:0)
[8] RasterizerStorageGLES3::sky_set_texture(RID, RID, int) (/root/godot/drivers/gles3/rasterizer_storage_gles3.cpp:1805)
[9] VisualServerRaster::sky_set_texture(RID, RID, int) (/root/godot/servers/visual/visual_server_raster.h:179)
[10] VisualServerWrapMT::sky_set_texture(RID, RID, int) (/root/godot/servers/visual/visual_server_wrap_mt.h:115)
[11] ProceduralSky::_radiance_changed() (/root/godot/scene/resources/sky.cpp:130)
[12] ProceduralSky::_thread_done(Ref<Image> const&) (/root/godot/scene/resources/sky.cpp:438)
[13] MethodBind1<Ref<Image> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/root/godot/./core/method_bind.gen.inc:775 (discriminator 12))
[14] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/root/godot/core/object.cpp:921 (discriminator 1))
[15] MessageQueue::_call_function(Object*, StringName const&, Variant const*, int, bool) (/root/godot/core/message_queue.cpp:250)
[16] MessageQueue::flush() (/root/godot/core/message_queue.cpp:299)
[17] SceneTree::iteration(float) (/root/godot/scene/main/scene_tree.cpp:484 (discriminator 2))
[18] Main::iteration() (/root/godot/main/main.cpp:2005)
[19] OS_X11::run() (/root/godot/platform/x11/os_x11.cpp:3257)
[20] /home/cammymoop/Downloads/godot_3.2/godot-3.2-debug-linux-gcc5.4/godot.x11.tools.64(main+0x116) [0x14588bc] (/root/godot/platform/x11/godot_x11.cpp:57)
[21] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0e1d64eb97] (??:0)
[22] /home/cammymoop/Downloads/godot_3.2/godot-3.2-debug-linux-gcc5.4/godot.x11.tools.64(_start+0x29) [0x14586d9] (??:?)
-- END OF BACKTRACE --
Looks like an issue with glGenerateMipmap() is causing OpenGL to crash on the next API call.
@FelixNemis Can you try updating your graphics drivers and see if that helps. In theory this code shouldn't cause a crash, so there is a good chance your drivers have a bug. Seeing as you are on linux, the latest MESA drivers should fix things.
@FelixNemis I can reproduce this with AMDs proprietary amdpgu-pro driver.
I CAN'T reproduce this on the open source mesa driver, so I'd say this is a bug with AMDs OpenGL implementation and not godot.
By the way, unless you have a specific reason to use the amdgpu-pro userland driver there's not really a point to having it installed as just using mesa + the standard kernel module usually performs better anyways. You can simply uninstall amdgpu-pro and the issue should go away.
If you really want this issue fixed I guess you could try sending AMD an email?
@Nutcake thanks for confirming my suspicions.
@FelixNemis unfortunately we can't do anything to fix AMD's buggy drivers. So I'll close this issue. If you are still experiencing the issue on Mesa drivers I can reopen.
I seem to be affected by whatever this bug is.
To reproduce:
Outcome:
My system:
Is there any workaround for this?
Is there any workaround for this?
Not that I know of. That said, this issue should be resolved in 4.0 thanks to the new sky system (which is also much faster).
Either way, procedural skies don't really benefit from having their radiance size or sky size increased. The difference is hardly noticeable to the naked eye, especially during actual gameplay.