-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.0 Alpha
-
None
-
Qt 5.0.2 on Android.
I am using Qt 5.0.2 (pre release) compiled from git. Qt is being linked into a daemon that is running as a Linux process inside of an Android device. It is compiled against bionic, and linked into an exe, and started by launchd. It is not loaded as a .so inside of a Dalvik VM.
This means that JNI_OnLoad's are never run. So things they initialize are not done.
In this context, if you try to use QSsl* objects from libQtNetwork.so, you get a crash in qsslsocket_openssl_android.cpp, when AttachedJNIEnv() does javaVM->GetEnv(). The solution is to skip the GetEnv when javaVM is NULL.
Likewise, there are dangling NULL pointers in libQtCore.so which should be checked.
The attached patch solved my crashes for me.