kflog-project / Cumulus

A free navigation program for glider pilots
http://www.kflog.org/cumulus/
GNU General Public License v3.0
16 stars 7 forks source link

wrong JNI environment handling in Android #29

Closed speed-axel closed 9 years ago

speed-axel commented 9 years ago

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.

speed-axel commented 9 years ago

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.

speed-axel commented 9 years ago

fixed.