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

Android/ Huawei: Crash in QAbstractEventDispatcherPrivate::allocateTimerId

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.12.9
    • Core: Other
    • None
    • Android

    Description

      It's one of top crashes of our app under Android according to Google Play Console.

      Most of the time it happens under Android 10. Half of Android 10 occurrences are under Android 9 and some bit under Android 8.

      And yes, it happens only under Huawei devices (e.g. Huawei Y9 Prime 2019), similar to other crash reports here (e.g. QTBUG-82617).

      The stack is typically this:

       

      *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
      pid: 0, tid: 0 >>> org.freedownloadmanager.fdm <<<backtrace:
        #00  pc 000000000027a190  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QAbstractEventDispatcherPrivate::allocateTimerId()+84)
        #00  pc 000000000027a5fc  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QAbstractEventDispatcher::registerTimer(int, Qt::TimerType, QObject*)+36)
        #00  pc 00000000002af2cc  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QObject::startTimer(int, Qt::TimerType)+108)
        #00  pc 00000000002be7f8  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QTimer::start(int)+92)
        #00  pc 00000000003fd4f4  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libfdm.so (AbstractDownloadsModules::initializeSelfBefore(bool)+600)
        #00  pc 00000000000279f0  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libvmsclshared.so (QtAbstractComplexModule::initialize(bool)+184)
        #00  pc 000000000003e31c  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libvmsclshared.so
        #00  pc 00000000002aeb74  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QObject::event(QEvent*)+540)
        #00  pc 0000000000281248  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QCoreApplicationPrivate::notify_helper(QObject*, QEvent*)+408)
        #00  pc 0000000000280d94  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QCoreApplication::notify(QObject*, QEvent*)+104)
        #00  pc 0000000000280cb4  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QCoreApplication::notifyInternal2(QObject*, QEvent*)+264)
        #00  pc 0000000000281e68  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+836)
        #00  pc 00000000002da788  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+72)
        #00  pc 000000000027c234  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+508)
        #00  pc 00000000000b4f08  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so (QThread::exec()+168)
        #00  pc 00000000000b5e04  /data/app/org.freedownloadmanager.fdm-nf-vRzlhN4y5hslJ6os3Xg==/lib/arm64/libQt5Core.so
        #00  pc 00000000000ce1b0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
        #00  pc 0000000000070ba8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

       I am using this code to initialize timer, nothing unusual:

      m_timer = new QTimer(this);
      connect(m_timer, &QTimer::timeout,
              m_statesSerializer.data(), &AbstractDownloadsModulesStatesSqlSerializer::saveAll);
      m_timer->start(1*60*1000);
      

      Timer is created and used at the same thread as its parent.

      Attachments

        Issue Links

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

          Activity

            People

              qtandroidteam Qt Android Team
              alervd Alexander Dyagilev
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes