OfficerYoda / Fhysics

A Physics simulation
MIT License
0 stars 0 forks source link

Spawning objects can cause ConcurrentModificationException #21

Closed OfficerYoda closed 5 months ago

OfficerYoda commented 6 months ago

When spawning objects it sometimes causes a ConcurrentModificationException. This happens because the insertion through spawning with the mouse is not synced with the fhysics update cycle

Fix

add a list of objects which should be added in the next update loop

OfficerYoda commented 5 months ago

Fixed by adding a toAdd List to QuadTree.