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

QRemoteObjectDynamicReplica::property crashes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Component/s: Remote Objects
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            bstottle Brett Stottlemyer
            Reporter:
            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