the issue was (I think), that I was calling createThread without actually checking whether the previous thread spawned with that same thread object had finished execution, so I added a call to joinThread before spawning a new one and the issues disappeared. In my defense, this kind of bug was really hard to track down because due to how the code was structured logically, a new worker wouldn't be spawned until the previous was done, the problem was that my definition of done is "it printed the result on the console", while of course the thread could've been doing some cleanup before fully exiting (probably arc stuff(