ebrahimebrahim / knock-the-rock

A 2D physics game about throwing rocks.
MIT License
3 stars 0 forks source link

Physics server can produce error when spawning rocks #13

Closed ebrahimebrahim closed 4 years ago

ebrahimebrahim commented 4 years ago

Challenge mode, as rocks spawn in we sometimes get chains of errors like this:

   At: servers/physics_2d/physics_2d_server_sw.cpp:730.
ERROR: body_set_shape_as_one_way_collision: Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.
   At: servers/physics_2d/physics_2d_server_sw.cpp:739.
ERROR: body_set_shape_as_one_way_collision: Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.
   At: servers/physics_2d/physics_2d_server_sw.cpp:739.

Stack trace in editor points us to the add_child(rock) line in GameBase.spawn_rocks

Still not sure how to reproduce error exactly, but just play challenge mode a bunch and watch stderr

ebrahimebrahim commented 4 years ago

Here's how to reproduce: