If a new thread is attached to the vm an environment pointer is returned. That environment must be used for all jni calls in the thread only. But at the moment the jni environment is put at a global variable and that is wrong.
Replace NewString against NewStringUTF in jnisupport.cpp, it is easier to use. Furthermore the toUtf8 method of QString should be used as argument to the NewString... function.
If a new thread is attached to the vm an environment pointer is returned. That environment must be used for all jni calls in the thread only. But at the moment the jni environment is put at a global variable and that is wrong.