Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101632

Android builds crash if exception is thrown in another library

    XMLWordPrintable

Details

    • Android
    • 2022wk38FOQtforAndroid

    Description

      Qt 5 crashes like this if another library (order of libraries might also affect whether to crash or not) throws an exception:

            #00 pc 000000000008a1fc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: f5221da919459753f7b7b4e061093090)
            #01 pc 00000000000b2ba0  /lib/arm64/libc++_shared.so (BuildId: 31abebc1b564add54fe43b52ce69acac326be4fe)
            #02 pc 00000000000aec8c  /lib/arm64/libc++_shared.so (__gxx_personality_v0+348) (BuildId: 31abebc1b564add54fe43b52ce69acac326be4fe)
            #03 pc 00000000002f2a74  /lib/arm64/libQt5Core_arm64-v8a.so (BuildId: e73aec33d7330e062baeaf7b0cf59bcf44c5472c)
            #04 pc 00000000002f2f7c  /lib/arm64/libQt5Core_arm64-v8a.so (_Unwind_Resume+116) (BuildId: e73aec33d7330e062baeaf7b0cf59bcf44c5472c)
            #05 pc 000000000003d5b4  /lib/arm64/libzzzz.so (zzzz(unsigned int)+696) (BuildId: fb1f776338289dbf8fa83578295457da6c2d8975)
            #06 pc 0000000000164f64  /lib/arm64/libzzzz.so (zzzz(unsigned int)+56) (BuildId: fc2a972fa7fa10af6b70339656727b8f08a1b5ee)
            #07 pc 00000000001650d8  /lib/arm64/libyyyy.so (yyyy()+136) (BuildId: fc2a972fa7fa10af6b70339656727b8f08a1b5ee)
            #08 pc 0000000000170d64  /lib/arm64/libxxxxx.so (xxxx+64) (BuildId: fc2a972fa7fa10af6b70339656727b8f08a1b5ee)
            #09 pc 00000000000ec8e8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: f5221da919459753f7b7b4e061093090)
            #10 pc 000000000008c258  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f5221da919459753f7b7b4e061093090)
      

      It seems to happen most likely because the workaround --exclude-libs,libgcc.a was removed in Qt 5.14. It seems that this is still needed (and in Qt 6, it should be used because cmake toolchain file sets it):

      https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#unwinding

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtandroidteam Qt Android Team
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes