Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.12.3
-
None
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.