Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android libQtNetwork.so SIGSEGV error
Forum Updated to NodeBB v4.3 + New Features

Android libQtNetwork.so SIGSEGV error

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lockheed
    wrote on last edited by
    #1

    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

    ekkescornerE 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      1
      • L lockheed

        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

        ekkescornerE Offline
        ekkescornerE Offline
        ekkescorner
        Qt Champions 2016
        wrote on last edited by
        #3

        @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

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.9 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        1 Reply Last reply
        3
        • L Offline
          L Offline
          lockheed
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lockheed
            wrote on last edited by
            #5

            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?

            ekkescornerE 1 Reply Last reply
            0
            • L lockheed

              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?

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #6

              @lockheed sorry - I'm doing all my development on macOS only.

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.9 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved