Changed buffer size :)
Guess what, game doesn't crash anymoooooreeeeee
Removed pthread from the engine