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
extendsSceneTreevararea=Area2D.new()
func_init():
varv=CPUParticles.new()
varid=area.create_shape_owner(v)
v.queue_free()
yield(self, "idle_frame") # wait for the object to be freedarea.shape_owner_get_owner(id)
CollisionObject2D::create_shape_owner() stores a raw Object * so it has no idea that the object is already freed.
After the freed pointer is returned by CollisionObject2D::shape_owner_get_owner(), it's then wrapped into a new Variant object, and there's a call to Object::_use_rc() in the constructor, resulting in a "heap-use-after-free" issue:
Adding a ERR_FAIL_COND_V(!ObjectDB::instance_validate(shapes[p_owner].owner), NULL); check in shape_owner_get_owner resolves the crash, but I don't know whether it's an ideal solution.
Godot version:
3.3.rc.custom_build. 7f2107e
OS
Ubuntu 20.04 - Ubuntu 3.36 X11
Issue description:
Executing
crashes Godot and address sanitizer shows this info
Project for easier testing - GDScript.zip
The text was updated successfully, but these errors were encountered: