Skip to content

Infinite loop in Physics2DServerSW::_update_shapes with Multi-Threaded physics #35017

@DrMoriarty

Description

@DrMoriarty

Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version:
Godot 3.2.beta 6 (commit 02cd144)

OS/device including version:
MacOSX 10.14.6 (18G95)

Issue description:

I have a lot of KinematicBody2D in one scene. In _physics_process I call move_and_collide and some times the game hungs up with logs:

ERROR: remove: Condition ' p_elem->_root != this ' is true.
   At: ./core/self_list.h:84.

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():

pending_shape_update_list.remove(pending_shape_update_list.first());

I have no ideas why pending_shape_update_list became broken. Does anybody have?

Steps to reproduce:

Minimal reproduction project:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions