Today I have gained some first-hand experience on unreproducible (hopefully) one-time bugs that mysteriously fix themselves the second I spend an hour posting in great detail about it on the forums. :')
When I learned about multithreading in C++, one of the first things was that while heap is shared, each thread has its own stack and it's impossible to access another thread's stack.
So I wrapped the variables into a static class and passed its address to another thread. And it worked.