Handling contact, thread , list question

Hello,

Currently what i do on Begin Contact i add the two fixtures to a custom object and then into a list. A thread looks into the list and hands the contacts. On rare
occasions i get an EXC_BAD_ACCESS when i try to work with the fixtures in the thread. The one fixture is the player and the other is a bullet.

Any tips from forum users?

Thanks
c
Avoid threads unless you really need them. How about just looking into the list to handle the contacts every timestep in the main game loop?
thanks for the tip. In the end thats what i have to do since after addding some debug output everywhere it appears the bullet is deallocated because it goes off screen in the game loop before the contact with the player has been processed:)

some rearranging of code is in order 🙂

c

Original thread: https://box2d.org/forum/viewtopic.php?t=7069