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

Segfault when setting the text property of a TextArea initiliased with qsTr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.10.1, 5.12.1
    • None
    • PyQt5 5.10.1

    Description

      The following code segfault when it updates the text property of the TextArea.  But it only happens when text is initialised first with qsTr (translations are not defined).

       function set_document(document) {
           title_text_area.text = document.title // -> segfault
       }
      
       TextArea {
           id: title_text_area
           // text: 'Title ...' // ok
           text: qsTr('Title ...') // -> segault
       }
      

      Backtrace

      Thread 1 "python" received signal SIGSEGV, Segmentation fault.
      0x00007fffe7194804 in QQmlBinding::expressionIdentifier() const ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      
      #0  0x00007fffe7194804 in QQmlBinding::expressionIdentifier() const ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #1  0x00007fffe70e86f7 in QV4::QObjectWrapper::setProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData*, QV4::Value const&) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #2  0x00007fffe70fa3ab in QV4::Runtime::method_setQmlQObjectProperty(QV4::ExecutionEngine*, QV4::Value const&, int, QV4::Value const&) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #3  0x00007fffcc02c76c in ?? ()
      #4  0x00007fffffff4630 in ?? ()
      #5  0x00007fffe637e01f in qpyquick_to_qvariant_convertor(_object*, QVariant&, bool*) ()
         from .../PyQt5/QtQuick.so
      #6  0x00007fffe704bd36 in QV4::ExecutionEngine::fromVariant(QVariant const&) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #7  0x00007fffe7109571 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #8  0x00007fffedaf54e2 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const ()
         from .../PyQt5/Qt/lib/libQt5Core.so.5
      #9  0x00007fffee193c0d in pyqtMethodProxy_call () from .../PyQt5/QtCore.so
      #10 0x00007ffff799870b in PyObject_Call () from /lib64/libpython3.6m.so.1.0
      #11 0x00007fffee195e15 in PyQtSlot::call(_object*, _object*) const () from .../PyQt5/QtCore.so
      #12 0x00007fffee196320 in PyQtSlot::invoke(void**, _object*, void*, bool) const ()
         from .../PyQt5/QtCore.so
      #13 0x00007fffee19659b in PyQtSlotProxy::unislot(void**) () from .../PyQt5/QtCore.so
      #14 0x00007fffee197377 in PyQtSlotProxy::qt_metacall(QMetaObject::Call, int, void**) ()
         from .../PyQt5/QtCore.so
      #15 0x00007fffedb14394 in QMetaObject::activate(QObject*, int, int, void**) ()
         from .../PyQt5/Qt/lib/libQt5Core.so.5
      #16 0x00007fffe7109784 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #17 0x00007fffe7162669 in ?? () from .../PyQt5/Qt/lib/libQt5Qml.so.5
          #18 0x00007fffe70e38fd in ?? () from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #19 0x00007fffe70e4f2d in ?? () from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #20 0x00007fffe70e60d0 in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #21 0x00007fffe70fdecb in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) ()
         from .../PyQt5/Qt/lib/libQt5Qml.so.5
      #22 0x00007fffe231abd1 in ?? ()
      #23 0x0000000000000000 in ?? ()
      

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              fabricesalvaire fabrice salvaire
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes