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

QRemoteObjectDynamicReplica::property crashes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.3
    • Remote Objects
    • None
    • Windows

    Description

      I'm trying to use a dynamic replica for the first time. Before, I've always used REP-files (which work flawlessly).

      I first create a QObject and set a dynamic property via QObject::setProperty. Then I call enableRemoting on this object and acquire a dynamic replica of the same name.
      Trying to access QObject::property on this QRemoteObjectDynamicReplica crashes, regardless if I try to access the formerly set dynamic property or another non-existing property.

      QObject::property on a normal (non-replica) QObject never crashes the program but returns QVariant, if trying to access a non-existing property.

      The following code crashes reproducibly on my system:

       

      QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:thehost")));
       QObject testObject;
       testObject.setProperty("foo", QVariant::fromValue(QString("33")));
       srcNode.enableRemoting(&testObject, "roFoo");
      QRemoteObjectNode repNode;
       repNode.connectToNode(QUrl(QStringLiteral("local:thehost")));
       QSharedPointer<QRemoteObjectDynamicReplica> dynrep;
       dynrep.reset(repNode.acquireDynamic("roFoo"));
       QVariant v;
       if (dynrep->waitForSource() && dynrep->isInitialized())
       { 
           v = dynrep->property("foo"); //This line crashes the program
       }
      

       

       

      The crash produces no good stack trace on my system, pointing only to QFSFileEngine::copy.

      Attachments

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

        Activity

          People

            bstottle Brett Stottlemyer
            mitja mitja
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes