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

App crashes always with Fatal signal 11 (SIGSEGV), code 2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.7.0
    • None
    • Android 5/6 on LG G2 and Honor 6 Smartphone

    Description

      With the following code my Qt android app always crashes after a few (varing) minutes. The crash is reproducable and the reason is "dismissing emit signal() and value change together with Q_PROPERTY for Qml".

      class MyClass : public QObject
      {
      Q_OBJECT
      Q_PROPERTY(qreal value MEMBER m_value NOTIFY valueChanged)

      void myFunction() const;
      }

      void myClass::myFunction() const {

      ....
      // falsely dismissed the order, should be vice versa
      qreal value = 5.0;
      emit valueChanged(value);
      m_value = value;
      }

      The myFunction is triggert from different sensorsfilters (e.g. QCompass, QRotation, QMagnetometer,...) and called around every 50msec. If I omit Q_PROPERTY/Qml no crash happens.

      The message in the ouput window is

      F/libc ( 3085): Fatal signal 11 (SIGSEGV), code 2, fault addr 0x4070f3cc in tid 3346 (QtThread)

      If I correctly implement "m_value = value;" and then "emit valueChanged(value);" everthing works fine. It seems so that if the emitting of the signal and few micro seconds later the value is changed and in the same time is passed to Qml a conflict occurs and brings the app to crash.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            tiroler Armin Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes