I have just got the same error after introducing a non related change. Solved after adding sync() at the end of each Thread