Unsolved Android libQtNetwork.so SIGSEGV error
-
I've made an app. After publication in google play store, there are bunch of error logs in 'ANR errors and exceptions' section.
Application using HTTPS to connect via REST Api with backend. OpenSSL libraries are explicitly attached. Errors already occured on Android 6.0, 7.0 and 8.0 devices.
Anyone have an idea what is the case?
Backtrace:
#00 pc 0000000000065908 /data/app/space.kolacki.uprawnienia_budowlane-2/lib/arm/libQt5Network.so #01 pc 00000000000656a9 /data/app/space.kolacki.uprawnienia_budowlane-2/lib/arm/libQt5Network.so (_ZN21QNetworkConfigurationD1Ev+4)
Link: https://play.google.com/store/apps/details?id=space.kolacki.uprawnienia_budowlane
-
Does it crash / refuse to work or are these "only" errors printed in the logs?
In general the problem with OpenSSL on Android is that the system ships with ancient SSL version up to and including Android 6, if I recall correctly. Later versions do not ship OpenSSL at all.
So, you need to compile OpenSSL for Android yourself (there are plenty of wikis and docs on how to do it, even in Qt documentation) and ship it together with your application (by using ANDROID_EXTRA_LIBS in your .pro file, for example).
The only "gotcha" here is that on Android 5 your new OpenSSL is likely to clash with the system-provided one. Maybe you won't run into that problem, though.
-
@lockheed compiling openssl and including works well on all OS - have it run from Android 4.4 to 8.1
perhaps this helps: https://github.com/ekke/android-openssl-qt -
I've used precompiled openssl libraries (I know... it was temporary solution) found somewhere on this (or other Qt) forum. They are added, and works fine on all my devices (including this with Android 7+ ) and avd's with Android 7+. From 71 application users, only 12 of them encountered problem.
I don't know how this error looks like, I can't reproduce it. But SIGSEGV and plenty of error reports from users looks like a crash.
I will go with your's suggestions, and compile OpenSSL (v. openssl-1.0.2k, like in ekkescorner example) on my own. Maybe it's just corrupted .so files, or deprecated version. I will post results later this week.
-
Ok, I'm back.
I have builded OpenSSL on my own, (ver. openssl-1.0.2o NDK: android-ndk-r13b ). Error still exist.
part of .pro file:
equals(ANDROID_TARGET_ARCH, armeabi-v7a) { ANDROID_EXTRA_LIBS += "E:/OpenSSL_Android_v7/openssl-1.0.2o/libcrypto.so" ANDROID_EXTRA_LIBS += "E:/OpenSSL_Android_v7/openssl-1.0.2o/libssl.so" } equals(ANDROID_TARGET_ARCH, armeabi) { ANDROID_EXTRA_LIBS += "E:/OpenSSL_Android/openssl-1.0.2o/libcrypto.so" ANDROID_EXTRA_LIBS += "E:/OpenSSL_Android/openssl-1.0.2o/libssl.so" }
Furthermore, new error popped out:
#00 pc 00000000000553a2 /system/lib/libc.so (arena_dalloc_bin_locked_impl+373) #01 pc 000000000006e917 /system/lib/libc.so (je_tcache_bin_flush_small+270) #02 pc 0000000000066e29 /system/lib/libc.so (ifree+432) #03 pc 000000000006710b /system/lib/libc.so (je_free+74) #04 pc 0000000000376529 /data/app/com.android.chrome-1/base.apk
By the way. I am developing under Win10, but OpenSSL was builded using Ubuntu (via WSL to be precise). Is it wrong?
-
@lockheed sorry - I'm doing all my development on macOS only.