You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a project with several NoiseTexture resources, occasionally the engine will crash.
This is caused by a deferred call to _update_texture, in which the NoiseTexture instance has been freed. But, inside the Callable, ObjectDB::get_instance still returns data.
Call stack:
godot.windows.tools.64.exe!std::_Atomic_integral<unsignedint,4>::fetch_add(constunsignedint _Operand, const std::memory_order _Order) Line 1553 (c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\atomic:1553)
godot.windows.tools.64.exe!std::_Atomic_integral_facade<unsigned int>::fetch_sub(constunsignedint _Operand, const std::memory_order _Order) Line 1782 (c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\atomic:1782)
godot.windows.tools.64.exe!SafeNumeric<unsigned int>::decrement() Line 82 (c:\Users\brian\Documents\GitHub\mygodot4\core\templates\safe_refcount.h:82)
godot.windows.tools.64.exe!SafeRefCount::unrefval() Line 182 (c:\Users\brian\Documents\GitHub\mygodot4\core\templates\safe_refcount.h:182)
godot.windows.tools.64.exe!RefCounted::unreference() Line 76 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\ref_counted.cpp:76)
godot.windows.tools.64.exe!Ref<Image>::unref() Line 220 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\ref_counted.h:220)
godot.windows.tools.64.exe!Ref<Image>::ref(const Ref<Image> & p_from) Line 67 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\ref_counted.h:67)
godot.windows.tools.64.exe!Ref<Image>::operator=(const Ref<Image> & p_from) Line 129 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\ref_counted.h:129)
godot.windows.tools.64.exe!NoiseTexture::_set_texture_image(const Ref<Image> & p_image) Line 90 (c:\Users\brian\Documents\GitHub\mygodot4\modules\opensimplex\noise_texture.cpp:90)
godot.windows.tools.64.exe!NoiseTexture::_update_texture() Line 166 (c:\Users\brian\Documents\GitHub\mygodot4\modules\opensimplex\noise_texture.cpp:166)
godot.windows.tools.64.exe!call_with_variant_args_helper<NoiseTexture>(NoiseTexture * p_instance, void(NoiseTexture::*)() p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<> __formal) Line 228 (c:\Users\brian\Documents\GitHub\mygodot4\core\variant\binder_common.h:228)
godot.windows.tools.64.exe!call_with_variant_args_dv<NoiseTexture>(NoiseTexture * p_instance, void(NoiseTexture::*)() p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error, const Vector<Variant> & default_values) Line 371 (c:\Users\brian\Documents\GitHub\mygodot4\core\variant\binder_common.h:371)
godot.windows.tools.64.exe!MethodBindT<NoiseTexture>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Callable::CallError & r_error) Line 282 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\method_bind.h:282)
godot.windows.tools.64.exe!Object::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 832 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\object.cpp:832)
godot.windows.tools.64.exe!Callable::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 62 (c:\Users\brian\Documents\GitHub\mygodot4\core\variant\callable.cpp:62)
godot.windows.tools.64.exe!MessageQueue::_call_function(const Callable & p_callable, const Variant * p_args, int p_argcount, bool p_show_error) Line 259 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\message_queue.cpp:259)
godot.windows.tools.64.exe!MessageQueue::flush() Line 306 (c:\Users\brian\Documents\GitHub\mygodot4\core\object\message_queue.cpp:306)
godot.windows.tools.64.exe!SceneTree::physics_process(double p_time) Line 424 (c:\Users\brian\Documents\GitHub\mygodot4\scene\main\scene_tree.cpp:424)
godot.windows.tools.64.exe!Main::iteration() Line 2552 (c:\Users\brian\Documents\GitHub\mygodot4\main\main.cpp:2552)
godot.windows.tools.64.exe!OS_Windows::run() Line 641 (c:\Users\brian\Documents\GitHub\mygodot4\platform\windows\os_windows.cpp:641)
Steps to reproduce
Create a scene that uses noise textures (e.g. mesh with StandardMaterial with NoiseTexture as albedo)
Try loading the project several times.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
Godot version
4.0.dev (46a139a)
System information
W10
Issue description
When loading a project with several NoiseTexture resources, occasionally the engine will crash.
This is caused by a deferred call to
_update_texture
, in which the NoiseTexture instance has been freed. But, inside the Callable,ObjectDB::get_instance
still returns data.Call stack:
Steps to reproduce
Create a scene that uses noise textures (e.g. mesh with StandardMaterial with NoiseTexture as albedo)
Try loading the project several times.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: