You still fail to understand me or you don't understand what threads are. I'm not asking whether your code is called by multiple threads at the same time, I'm asking whether both functions are called from the same thread (sequentially, not concurrently). The fact that the main thread of the process is executed by the java runtime says exactly nothing about which thread is calling your function. You can't answer my question without either debugging the java app, asking its author or inspecting its (app's, not author's) source code. So far we can only see Qt says your data is referenced by two threads. The only question is whether you start the thread in one of your dialogs or the java part does and what can you do to prevent it.