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

Segfault on project load due to generating thumbnail for a Gradient2D.tres texture file #70974

Closed
unfa opened this issue Jan 5, 2023 · 19 comments · Fixed by #91630
Closed

Segfault on project load due to generating thumbnail for a Gradient2D.tres texture file #70974

unfa opened this issue Jan 5, 2023 · 19 comments · Fixed by #91630

Comments

@unfa
Copy link

unfa commented Jan 5, 2023

Godot version

Godot 4.0 dev

System information

Arch Linux + X11 + Radeon RX6800XT

Issue description

Yesterday suddenly Godot editor crashed and I am no longer able to load my project. It segfaults every time when I load it - sometimes immediatelly, sometimes after a few seconds.

Here's is the backtrace:

#0  RefCounted::reference (this=this@entry=0x1eff483e0bff) at core/object/ref_counted.cpp:59
#1  0x0000555556907f5d in Ref<Gradient>::ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:69
#2  Ref<Gradient>::ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:60
#3  Ref<Gradient>::Ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:177
#4  NoiseTexture2D::_generate_texture (this=0x7fff047f6660) at modules/noise/noise_texture_2d.cpp:164
#5  0x00005555569082c5 in NoiseTexture2D::_update_texture (this=0x7fff047f6660) at modules/noise/noise_texture_2d.cpp:208
#6  0x000055555616c879 in call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_args=<synthetic pointer>, r_error=..., 
    p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:262
#7  call_with_variant_args_dv<__UnexistingClass> (p_args=<optimized out>, default_values=..., r_error=..., p_argcount=<optimized out>, p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:409
#8  MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (this=<optimized out>, p_object=<optimized out>, p_args=<optimized out>, p_arg_count=<optimized out>, r_error=...) at ./core/object/method_bind.h:320
#9  0x0000555559ffd6b6 in Object::callp (this=0x7fff047f6660, p_method=..., p_args=0x0, p_argcount=<optimized out>, r_error=...) at core/object/object.cpp:733
#10 0x0000555559d2d987 in Callable::callp (this=this@entry=0x7fffea1e6038, p_arguments=p_arguments@entry=0x0, p_argcount=p_argcount@entry=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:62
#11 0x0000555559ff8e69 in MessageQueue::_call_function (this=<optimized out>, p_callable=..., p_args=<optimized out>, p_argcount=0, p_show_error=<optimized out>) at core/object/message_queue.cpp:229
#12 0x0000555559ff91ac in MessageQueue::flush (this=0x55555d070550) at core/object/message_queue.cpp:275
#13 0x000055555814138f in SceneTree::physics_process (this=0x555560d4c850, p_time=0.016666666666666666) at scene/main/scene_tree.cpp:430
#14 0x000055555605781b in Main::iteration () at main/main.cpp:3163
#15 0x0000555555ff2b01 in OS_LinuxBSD::run (this=this@entry=0x7fffffffe2e0) at platform/linuxbsd/os_linuxbsd.cpp:878
#16 0x0000555555fe4f89 in main (argc=<optimized out>, argv=0x7fffffffe838) at platform/linuxbsd/godot_linuxbsd.cpp:73

Steps to reproduce

No idea :/

Minimal reproduction project

I don't have one :/

@unfa
Copy link
Author

unfa commented Jan 6, 2023

Another backtrace:

Thread 1 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
Gradient::get_color_at_offset (p_offset=<optimized out>, this=0x7fffb89ef000) at ./scene/resources/gradient.h:104
104                     int high = points.size() - 1;
(gdb) bt
#0  Gradient::get_color_at_offset (p_offset=<optimized out>, this=0x7fffb89ef000) at ./scene/resources/gradient.h:104
#1  NoiseTexture2D::_modulate_with_gradient (this=0x7fffb87bf270, p_image=..., p_gradient=...) at modules/noise/noise_texture_2d.cpp:185
#2  0x0000555556907fa1 in NoiseTexture2D::_generate_texture (this=0x7fffb87bf270) at modules/noise/noise_texture_2d.cpp:164
#3  0x00005555569082c5 in NoiseTexture2D::_update_texture (this=0x7fffb87bf270) at modules/noise/noise_texture_2d.cpp:208
#4  0x000055555616c879 in call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_args=<synthetic pointer>, r_error=..., 
    p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:262
#5  call_with_variant_args_dv<__UnexistingClass> (p_args=<optimized out>, default_values=..., r_error=..., p_argcount=<optimized out>, p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:409
#6  MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (this=<optimized out>, p_object=<optimized out>, p_args=<optimized out>, p_arg_count=<optimized out>, r_error=...) at ./core/object/method_bind.h:320
#7  0x0000555559ffd6b6 in Object::callp (this=0x7fffb87bf270, p_method=..., p_args=0x0, p_argcount=<optimized out>, r_error=...) at core/object/object.cpp:733
#8  0x0000555559d2d987 in Callable::callp (this=this@entry=0x7fffea1e6998, p_arguments=p_arguments@entry=0x0, p_argcount=p_argcount@entry=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:62
#9  0x0000555559ff8e69 in MessageQueue::_call_function (this=<optimized out>, p_callable=..., p_args=<optimized out>, p_argcount=0, p_show_error=<optimized out>) at core/object/message_queue.cpp:229
#10 0x0000555559ff91ac in MessageQueue::flush (this=0x55555d070460) at core/object/message_queue.cpp:275
#11 0x000055555814138f in SceneTree::physics_process (this=0x555560d4a920, p_time=0.016666666666666666) at scene/main/scene_tree.cpp:430
#12 0x000055555605781b in Main::iteration () at main/main.cpp:3163
#13 0x0000555555ff2b01 in OS_LinuxBSD::run (this=this@entry=0x7fffffffe2e0) at platform/linuxbsd/os_linuxbsd.cpp:878
#14 0x0000555555fe4f89 in main (argc=<optimized out>, argv=0x7fffffffe838) at platform/linuxbsd/godot_linuxbsd.cpp:73

@unfa
Copy link
Author

unfa commented Jan 6, 2023

3rd backtrace. They seem to be a bit different.

Thread 1 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
RefCounted::reference (this=this@entry=0x200000002) at core/object/ref_counted.cpp:59
59              uint32_t rc_val = refcount.refval();
(gdb) bt
#0  RefCounted::reference (this=this@entry=0x200000002) at core/object/ref_counted.cpp:59
#1  0x0000555556907f5d in Ref<Gradient>::ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:69
#2  Ref<Gradient>::ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:60
#3  Ref<Gradient>::Ref (p_from=..., this=0x7fffffffdf38) at ./core/object/ref_counted.h:177
#4  NoiseTexture2D::_generate_texture (this=0x7fffa8717a70) at modules/noise/noise_texture_2d.cpp:164
#5  0x00005555569082c5 in NoiseTexture2D::_update_texture (this=0x7fffa8717a70) at modules/noise/noise_texture_2d.cpp:208
#6  0x000055555616c879 in call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_args=<synthetic pointer>, r_error=..., 
    p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:262
#7  call_with_variant_args_dv<__UnexistingClass> (p_args=<optimized out>, default_values=..., r_error=..., p_argcount=<optimized out>, p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:409
#8  MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (this=<optimized out>, p_object=<optimized out>, p_args=<optimized out>, p_arg_count=<optimized out>, r_error=...) at ./core/object/method_bind.h:320
#9  0x0000555559ffd6b6 in Object::callp (this=0x7fffa8717a70, p_method=..., p_args=0x0, p_argcount=<optimized out>, r_error=...) at core/object/object.cpp:733
#10 0x0000555559d2d987 in Callable::callp (this=this@entry=0x7fffea1e6038, p_arguments=p_arguments@entry=0x0, p_argcount=p_argcount@entry=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:62
#11 0x0000555559ff8e69 in MessageQueue::_call_function (this=<optimized out>, p_callable=..., p_args=<optimized out>, p_argcount=0, p_show_error=<optimized out>) at core/object/message_queue.cpp:229
#12 0x0000555559ff91ac in MessageQueue::flush (this=0x55555d071360) at core/object/message_queue.cpp:275
#13 0x000055555814138f in SceneTree::physics_process (this=0x555560897750, p_time=0.016666666666666666) at scene/main/scene_tree.cpp:430
#14 0x000055555605781b in Main::iteration () at main/main.cpp:3163
#15 0x0000555555ff2b01 in OS_LinuxBSD::run (this=this@entry=0x7fffffffe2e0) at platform/linuxbsd/os_linuxbsd.cpp:878
#16 0x0000555555fe4f89 in main (argc=<optimized out>, argv=0x7fffffffe838) at platform/linuxbsd/godot_linuxbsd.cpp:73

@unfa unfa changed the title Segfault on project load (Noise Texture?) Segfault on project load (Gradient?) Jan 6, 2023
@unfa
Copy link
Author

unfa commented Jan 6, 2023

I've tried in a fresh repository clone (it helps sometimes) - this time Godot received a SIGILL, not a SIGSEGV 🤔

ERROR: Condition "!tex" is true.
   at: texture_replace (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1253)
ERROR: low > high, this may be a bug
   at: get_color_at_offset (./scene/resources/gradient.h:109)
ERROR: Index p_index = 0 is out of bounds (size() = -213898788).
   at: get (./core/templates/cowdata.h:155)

Thread 1 "godot.linuxbsd." received signal SIGILL, Illegal instruction.
GradientTexture2D::_update (this=0x7fff1c981620) at scene/resources/texture.cpp:2326
2326                                            image->set_pixel(x, y, g.get_color_at_offset(ofs));
(gdb) bt
#0  GradientTexture2D::_update (this=0x7fff1c981620) at scene/resources/texture.cpp:2326
#1  0x000055555616c879 in call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_args=<synthetic pointer>, r_error=..., 
    p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:262
#2  call_with_variant_args_dv<__UnexistingClass> (p_args=<optimized out>, default_values=..., r_error=..., p_argcount=<optimized out>, p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:409
#3  MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (this=<optimized out>, p_object=<optimized out>, p_args=<optimized out>, p_arg_count=<optimized out>, r_error=...) at ./core/object/method_bind.h:320
#4  0x0000555559ffd6b6 in Object::callp (this=0x7fff1c981620, p_method=..., p_args=0x0, p_argcount=<optimized out>, r_error=...) at core/object/object.cpp:733
#5  0x0000555559d2d987 in Callable::callp (this=this@entry=0x7fffea1e6308, p_arguments=p_arguments@entry=0x0, p_argcount=p_argcount@entry=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:62
#6  0x0000555559ff8e69 in MessageQueue::_call_function (this=<optimized out>, p_callable=..., p_args=<optimized out>, p_argcount=0, p_show_error=<optimized out>) at core/object/message_queue.cpp:229
#7  0x0000555559ff91ac in MessageQueue::flush (this=0x55555d06fe80) at core/object/message_queue.cpp:275
#8  0x0000555558140800 in SceneTree::process (this=0x55555ff342f0, p_time=0.0068989999999999998) at scene/main/scene_tree.cpp:461
#9  0x00005555560579a3 in Main::iteration () at main/main.cpp:3193
#10 0x0000555555ff2b01 in OS_LinuxBSD::run (this=this@entry=0x7fffffffdca0) at platform/linuxbsd/os_linuxbsd.cpp:878
#11 0x0000555555fe4f89 in main (argc=<optimized out>, argv=0x7fffffffe1f8) at platform/linuxbsd/godot_linuxbsd.cpp:73

@unfa
Copy link
Author

unfa commented Jan 6, 2023

I've deleted one file that could be a problem here, but now Godot gets into an infinite loop:

Thread 29 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd0bf16c0 (LWP 384469)]
0x00007ffff7d0283b in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7d0283b in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff7d04de5 in ?? () from /usr/lib/libc.so.6
#2  0x0000555559c0de52 in Logger::logf_error (this=this@entry=0x55555cd2aaf0, p_format=p_format@entry=0x55555a9e5b34 "%sERROR:%s %s\n") at core/io/logger.cpp:114
#3  0x0000555556f0e7ba in UnixTerminalLogger::log_error (this=0x55555cd2aaf0, p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_code=<optimized out>, 
    p_rationale=<optimized out>, p_editor_notify=false, p_type=Logger::ERR_ERROR) at drivers/unix/os_unix.cpp:618
#4  0x0000555559c0dc0c in CompositeLogger::log_error (p_type=Logger::ERR_ERROR, p_editor_notify=false, p_rationale=0x55555a53e7a2 "", 
    p_code=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_line=1079, p_file=0x55555ab377e2 "editor/editor_settings.cpp", 
    p_function=0x55555ab377fd "_EDITOR_GET", this=0x55555cd2ab30) at core/io/logger.cpp:256
#5  CompositeLogger::log_error (this=0x55555cd2ab30, p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_code=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_rationale=0x55555a53e7a2 "", p_editor_notify=false, 
    p_type=Logger::ERR_ERROR) at core/io/logger.cpp:250
#6  0x000055555a0a580e in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:87
#7  0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, 
    p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, 
    p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#8  0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#9  0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, 
    p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#10 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#11 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, 
    p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, 
    p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#12 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#13 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, 
    p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#14 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#15 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, 
    p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, 
    p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#16 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#17 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, 
    p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#18 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#19 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, 
    p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, 
    p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#20 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#21 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, 
    p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#22 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, 
    p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#23 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, 
--Type <RET> for more, q to quit, c to continue without paging--c
    p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#24 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#25 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#26 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#27 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#28 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#29 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#30 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#31 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#32 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#33 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#34 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#35 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#36 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#37 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#38 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#39 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#40 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#41 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#42 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#43 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#44 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#45 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#46 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#47 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#48 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#49 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#50 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#51 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#52 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#53 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#54 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#55 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#56 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#57 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#58 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#59 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#60 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#61 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#62 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#63 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#64 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#65 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#66 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#67 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
#68 0x00005555572e0e7d in _EDITOR_GET (p_setting=...) at editor/editor_settings.cpp:1079
#69 0x000055555735fd33 in EditorToaster::_error_handler (p_self=<optimized out>, p_func=<optimized out>, p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_errorexp=0x55555a53e7a2 "", p_editor_notify=false, p_type=ERR_HANDLER_ERROR) at editor/editor_toaster.cpp:157
#70 0x000055555a0a5846 in _err_print_error (p_function=0x55555ab377fd "_EDITOR_GET", p_file=0x55555ab377e2 "editor/editor_settings.cpp", p_line=1079, p_error=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55555a53e7a2 "", p_editor_notify=<optimized out>, p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:97
#71 0x000055555a0a58c6 in _err_print_error (p_function=p_function@entry=0x55555ab377fd "_EDITOR_GET", p_file=p_file@entry=0x55555ab377e2 "editor/editor_settings.cpp", p_line=p_line@entry=1079, p_error=p_error@entry=0x55555ab35498 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=p_editor_notify@entry=false, p_type=p_type@entry=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:77
[ this repeats for thousands of lines ]

@unfa
Copy link
Author

unfa commented Jan 6, 2023

After clearing the import cache it imports all assets and then crashes:

Thread 546 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff697fe6c0 (LWP 387356)]
0x0000555559c5ea86 in ResourceLoader::get_resource_type (p_path=...) at core/io/resource_loader.cpp:758
758                     String result = loader[i]->get_resource_type(local_path);

@unfa
Copy link
Author

unfa commented Jan 6, 2023

I've bisected my codebase and found a commit that introduces this problem:

https://codeberg.org/Liblast/Liblast/commit/de7c0219145e8506538d159a6e555ad5a8c76ab8

The amazing thing is that this code has worked for weeks and only a very recently Godot started crashing every time I load the project.

Also - the changes this commit introduces have absolutely nothing to do with gradients or any other visuals. I don't know why they suddenly trigger Godot to crash. This feels very random, and unfortunately it happens every once in a while in Liblast - Godot just refuses to cooperate on code it worked with a day before. Sometimes doing a fresh repository clone helps, sometimes it doesn't.

Git bisect final output:

de7c0219145e8506538d159a6e555ad5a8c76ab8 is the first bad commit
commit de7c0219145e8506538d159a6e555ad5a8c76ab8
Author: unfa <[email protected]>
Date:   Wed Dec 21 16:28:14 2022 +0100

    Fixed Maps not being listed in Godot game exports (fixes #396 ); Updated code to Godot 4 beta 9

 Game/Assets/Menu/GameMenu.gd                 | 2 +-
 Game/Assets/Singletons/PerformanceMonitor.gd | 2 +-
 Game/Assets/UI/DebugPanel.gd                 | 2 +-
 Game/LegacyMain.gd                           | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

@unfa
Copy link
Author

unfa commented Jan 6, 2023

Update: I've branched out from the last known good commit and... it's crashing there again. I'm completely stuck.

@adamscott
Copy link
Member

Can you bisect the Godot commit?

@unfa
Copy link
Author

unfa commented Jan 6, 2023

I have tested Godot builds back to Beta 4 but they all crash. I don't know if the project will even open in alpha builds any more.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 7, 2023

I tried opening Liblast in almost-newest Godot master and it doesn't crash for me, but all imported files are corrupted for whatever reason (PNGs don't import etc.)

Maybe try clearing your user data and temp folders?

@unfa
Copy link
Author

unfa commented Jan 7, 2023

@KoBeWi Did you clone with LFS? All PNG file are stored in it, so if you skipped that, they are just pointers, not actual files.

I'm tempted to try on a different OS / machine (virtual?).
I'll try clearing all possible cache as you said:

EDIT:

I've renamed ~/.cache/godot and ~/.local/godot to no effect using (yesterday's) latest main build:

Thread 1 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
Gradient::get_color_at_offset (p_offset=0.453979373, this=0x7fff3d530460) at ./scene/resources/gradient.h:116
116                             if (point.offset > p_offset) {
(gdb) bt
#0  Gradient::get_color_at_offset (p_offset=0.453979373, this=0x7fff3d530460) at ./scene/resources/gradient.h:116
#1  GradientTexture2D::_update (this=0x7fff3d50c950) at scene/resources/texture.cpp:2338
#2  0x000055555616c879 in call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_args=<synthetic pointer>, r_error=..., 
    p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:262
#3  call_with_variant_args_dv<__UnexistingClass> (p_args=<optimized out>, default_values=..., r_error=..., p_argcount=<optimized out>, p_method=<optimized out>, p_instance=<optimized out>) at ./core/variant/binder_common.h:409
#4  MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) const (this=<optimized out>, p_object=<optimized out>, p_args=<optimized out>, p_arg_count=<optimized out>, r_error=...) at ./core/object/method_bind.h:320
#5  0x0000555559ffd6b6 in Object::callp (this=0x7fff3d50c950, p_method=..., p_args=0x0, p_argcount=<optimized out>, r_error=...) at core/object/object.cpp:733
#6  0x0000555559d2d987 in Callable::callp (this=this@entry=0x7fffea1e60b0, p_arguments=p_arguments@entry=0x0, p_argcount=p_argcount@entry=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:62
#7  0x0000555559ff8e69 in MessageQueue::_call_function (this=<optimized out>, p_callable=..., p_args=<optimized out>, p_argcount=0, p_show_error=<optimized out>) at core/object/message_queue.cpp:229
#8  0x0000555559ff91ac in MessageQueue::flush (this=0x55555d05be60) at core/object/message_queue.cpp:275
#9  0x000055555814138f in SceneTree::physics_process (this=0x55555f54c240, p_time=0.016666666666666666) at scene/main/scene_tree.cpp:430
#10 0x000055555605781b in Main::iteration () at main/main.cpp:3163
#11 0x0000555555ff2b01 in OS_LinuxBSD::run (this=this@entry=0x7fffffffe2e0) at platform/linuxbsd/os_linuxbsd.cpp:878
#12 0x0000555555fe4f89 in main (argc=<optimized out>, argv=0x7fffffffe838) at platform/linuxbsd/godot_linuxbsd.cpp:73

@KoBeWi
Copy link
Member

KoBeWi commented Jan 7, 2023

Ok I cloned it instead of downloading zip and it loads correctly now:
image
So seems like crash is on your side for whatever reason.

Maybe try cloning the repo again and running Godot in portable mode?

@unfa
Copy link
Author

unfa commented Jan 8, 2023

@KoBeWi Hmm. Glad it does work for someone :D
What is portable mode? I can't find anything about this.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 8, 2023

It's called self-contained mode actually: https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html#self-contained-mode

@unfa
Copy link
Author

unfa commented Jan 8, 2023

Thanks, I'll test that. Though even if I find a way to get this to not happen, it's still a bug in the engine - a one that's hard to reproduce but a bug nonetheless. Unfortunately I've seen quite a few of these phantom bugs that seem to depend more on the weather than my code.

@unfa
Copy link
Author

unfa commented Jan 8, 2023

Wow. Self-contained mode worked. One time. For 10 seconds.

I guess I need to wipe the editor files every time I want to run it, then I have 10 seconds to do something before it crashes again.

I suspect this means it's crashing when trying to make a thumbnail. This gives me an idea. I have some Gradient2D texture resources saved - I'll delete these and see if this persists.

@unfa
Copy link
Author

unfa commented Jan 8, 2023

This seems to be helping. I have deleted these two resources from my game project and it seems to to be crashing.
CircleAlpha.zip

@unfa unfa changed the title Segfault on project load (Gradient?) Segfault on project load due to generating thumbnail for a Gradient2D.tres texture file Jan 10, 2023
@AThousandShips AThousandShips added this to the 4.3 milestone May 9, 2024
@mihe

This comment has been minimized.

@akien-mga
Copy link
Member

Fixed by #91630.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants