Simplified:
I am writing plugins to realbasic. I have two plugins with their own threads. Everything is fine until i start to use std::vector. I have vector<> variables in both plugins and I am not using the vectors to use same data or to share data between threads or anything else. My model looks like this:

If I don't declare the vectors static, the program most of the times crashes. But even when i declare the variables static, and use some of algorithms like sort or copy, the crashes appear again.
It seems like the operations on vector are using some abstract class which is not multithread safe or something. Or am I doing something wrong?
Thank you.