Godot version: 3.0.2/3.0.3 rc2 and rc3
OS/device including version: Ubuntu 18.04
Issue description:
Godot 3.0.2 freezes an 3.0.3rc2 and rc3 crashes when browsing the asset library.
Steps to reproduce:
Change pages until it happens, can be as few as 4 page changes.
On 3.0.3 rc3 (and rc2) it leads to a crash instead of freeze (the libpng errors happen all the time, not sure if related), this is the stacktrace on Godot 3 rc3::
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94.
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252.
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327.
handle_crash: Program crashed with signal 11
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f3cd91c3f20] (??:0)
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f3cd91c3f20] (??:0)
[2] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9e4e74] (??:?)
[2] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9e4e74] (??:?)
[3] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9ddbc2] (??:?)
[3] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9ddbc2] (??:?)
[4] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9ee22a] (??:?)
[4] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9ee22a] (??:?)
[5] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9b23f2] (??:?)
[5] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9b23f2] (??:?)
[6] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9b4ae2] (??:?)
[6] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9b4ae2] (??:?)
[7] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9f4d58] (??:?)
[7] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x9f4d58] (??:?)
[8] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x8cdcd9] (<artificial>:?)
[8] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x8cdcd9] (<artificial>:?)
[9] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x198d8a4] (??:?)
[9] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x198d8a4] (??:?)
[10] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x1013d85] (<artificial>:?)
[10] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x1013d85] (<artificial>:?)
[11] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x101594d] (<artificial>:?)
[11] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0x101594d] (<artificial>:?)
[12] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0xbe8d94] (<artificial>:?)
[12] Godot3.0/Godot_v3.0.3-rc3_x11.64() [0xbe8d94] (<artificial>:?)
[13] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f3cd7c0c6db] (??:0)
[13] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f3cd7c0c6db] (??:0)
[14] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f3cd92a688f] (??:0)
-- END OF BACKTRACE --
Same, also on Ubuntu 18.04. Even just opening the templates/asset library locks up Godot and makes my fan go nuts.
Same in windows 7 and in Ubuntu 16
You can even reproduce this searching in the demo projects.
I think it have to do directly with the icons of the projects/plugins
I can't reproduce it with 3.1.dev d0b62ce15
It seems like crash happens while doing HTTP Request.
I have no knowledge in these realms, so I doubt I can fix this. Maybe someone with more experience here might fix this.
Call stack on 3.0 branch from built from source (windows 10 x64)
```
ntdll.dll!00007fffd25e4eaa() Unknown
ntdll.dll!00007fffd25ec9b6() Unknown
ntdll.dll!00007fffd25ecc81() Unknown
ntdll.dll!00007fffd2589af5() Unknown
ntdll.dll!00007fffd25974c7() Unknown
ntdll.dll!00007fffd24fd50a() Unknown
ntdll.dll!00007fffd24fd249() Unknown
ntdll.dll!00007fffd24fd14a() Unknown
godot.windows.tools.64.exe!_realloc_base(void * block, unsigned __int64 size) Line 46 C++
godot.windows.tools.64.exe!default_realloc_ex(void * str, unsigned __int64 num, const char * file, int line) Line 98 C
godot.windows.tools.64.exe!CRYPTO_realloc(void * str, int num, const char * file, int line) Line 379 C
godot.windows.tools.64.exe!expand(lhash_st * lh) Line 333 C
godot.windows.tools.64.exe!lh_insert(lhash_st * lh, void * data) Line 204 C
godot.windows.tools.64.exe!int_thread_set_item(err_state_st * d) Line 519 C
godot.windows.tools.64.exe!ERR_get_state() Line 1046 C
godot.windows.tools.64.exe!ERR_clear_error() Line 746 C
godot.windows.tools.64.exe!ssl23_connect(ssl_st * s) Line 156 C
godot.windows.tools.64.exe!SSL_connect(ssl_st * s) Line 1009 C
godot.windows.tools.64.exe!StreamPeerOpenSSL::connect_to_stream(Refp_base, bool p_validate_certs, const String & p_for_hostname) Line 380 C++
godot.windows.tools.64.exe!HTTPClient::poll() Line 301 C++
godot.windows.tools.64.exe!HTTPRequest::_update_connection() Line 286 C++
godot.windows.tools.64.exe!HTTPRequest::_thread_func(void * p_userdata) Line 164 C++
godot.windows.tools.64.exe!ThreadWindows::thread_callback(void * userdata) Line 56 C++
[External Code]
````
@godotengine/bugsquad Would have been good to put this one in the 3.0 milestone when triaging it, since that's what we reviewed with @hpvb before considering 3.0.3 ready to go stable.
Edit: Actually I think that we should always label issues 3.0 if reported against a RC - we can later assess if they're also valid in master and move to the 3.1 milestone, but by default we should double check stable first.
Also happening in Windows 10.
OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2
I'm getting this on macOS, Godot 3.0.3 from homebrew. Disabling "Use Threads" in Editor > Editor Settings > Network > Asset Library resolves the issue for me
I'm getting this on macOS, Godot 3.0.3 from homebrew. Disabling "Use Threads" in Editor > Editor Settings > Network > Asset Library resolves the issue for me
Whoops... @hpvb Remember that "safe" commit enabling threading in the Asset Library I was telling you to put into 3.0.2 right before the release? :P
So, I guess we can revert 89bff17cd2e, unless @Faless has a hint about why it would crash (in 3.0) and how to fix it.
I am seeing what I think is a closely related / another-manifestation-of-same issue on the Templates tab in the project launcher. It happens when first switching to the Templates tab in the project launcher, and/or when switching between pages in the tab. I'm on Windows 10 and it happens...
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader.png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_men_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
It's extremely unfortunate that seeing this crash is likely to be one of the first impressions of Godot many new users will have, as has been my experience.
Hi I'm also getting the same thing:
Godot: v3.0.3 stable
OS: Windows 10 Pro
Graphics: Intel HD Graphics 620 - latest drivers
Just switching to the 'Templates' tab causes some elements to load but then I get lots of errors and it crashes:
OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 620
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
ERROR: _png_error_function: Not a PNG file
At: drivers/png/image_loader_png.cpp:62
libpng error: Not a PNG file
ERROR: _load_image: PNG Corrupted
At: drivers/png/image_loader_png.cpp:94
ERROR: _load_mem_png: Condition ' err ' is true. returned: Ref<Image>()
At: drivers/png/image_loader_png.cpp:252
ERROR: copy_internals_from: Condition ' p_image.is_null() ' is true.
At: core/image.h:327
ERROR: _jpegd_mem_loader_func: Couldn't initialize ImageLoaderJPG with the given resource.
At: modules/jpg/image_loader_jpegd.cpp:125
So, I guess we can revert 89bff17, unless @Faless has a hint about why it would crash (in 3.0) and how to fix it.
Actually reverting it won't be enough for existing users of 3.0.3, as they now have the option set. We'd have to force the option OFF regardless of user settings (easy to do), or fix whatever makes threading crashy. As I can't reproduce the issue on my end I'd tend towards the "turn it OFF" option, and we can work on a better fix in the master branch.
I have no idea why that is crashy, but crashes in threaded HTTPRequests really need to be fixed, if that really is the trigger. :/
Fixed by 909eaed.
Most helpful comment
Whoops... @hpvb Remember that "safe" commit enabling threading in the Asset Library I was telling you to put into 3.0.2 right before the release? :P
So, I guess we can revert 89bff17cd2e, unless @Faless has a hint about why it would crash (in
3.0) and how to fix it.