Open DrMoriarty opened 4 years ago
Also I double checked that all my object manipulations was in physics frame. Also set all timer and tweens to physics process mode.
The bug only reproduced in multi-threaded physics. When I set physics/2d/thread_model
to Single-Safe all works as expected.
I recently tested similar multi-threaded physics issue in https://github.com/godotengine/godot/issues/29369#issuecomment-572592562.
Perhaps a read-write lock could be used to mitigate this issue on the pending shape update list? As I cannot reliably reproduce I can't test.
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
I am still getting similar issue (v3.2.4.rc.mono.custom_build.4b9b9ed2f), multi-thread rendering is on:
ERROR: SelfList<class CollisionObject2DSW>::List::remove: Condition "p_elem->_root != this" is true.
(core/self_list.h:84)
happens randomly when trying to call .instance()
on scene which contains physics body (in my case KinematicBody2D) in thread (C#).
EDIT: Well it doesn't happen with physics Multi-Threaded option for me.
I still get this problem in 3.3.3, even with single-safe. With multi-threaded it happens way more often. I use many kinematic bodies.
I am having this issue on 3.3.4-stable, but resolved it by switching from Multi-Threaded
Physics thread model to Single-Safe
.
Here is a visual studio minidump: _update_shapes-bug-godot.windows.tools.64.dmp.zip
Somebody please attach a reproduction project. From the information so far it seems to be a 3.x
issue, so I'm changing the milestone. If it is reproducible in 4.0
then please let us know (with a reproduction project).
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version: Godot 3.2.beta 6 (commit 02cd144222)
OS/device including version: MacOSX 10.14.6 (18G95)
Issue description:
I have a lot of KinematicBody2D in one scene. In
_physics_process
I callmove_and_collide
and some times the game hungs up with logs:This lines repeates many times. Actually infinite amount of times, because it prints from the infinite loop.
I catched the bug with xcode debugger and it shows me that the problem is in
void Physics2DServerSW::_update_shapes()
: https://github.com/godotengine/godot/blob/02cd1442227127604549159d66b9bfc68a193dd3/servers/physics_2d/physics_2d_server_sw.cpp#L1421I have no ideas why
pending_shape_update_list
became broken. Does anybody have?Steps to reproduce:
Minimal reproduction project: