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

qtremoteobject remote signal connected to remote slot timeout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.5
    • Fix Version/s: None
    • Component/s: Remote Objects
    • Labels:
      None
    • Environment:
      Ubuntu 20.04
    • Platform/s:
      Linux/X11, Linux/Other display system

      Description

      Hi,

      With a .rep file like this:

       

      class RemoteBugTest
      {
         SIGNAL(testSignal())
         SLOT(bool testSlot())
      }
      

      If on the client side (replica), we connect the signal to the slot

      // code placeholder
      QObject::connect(&replica, &RemoteBugTest::testSignal, [this]{
         auto reply = replica.testSlot();
         if(reply.waitForFinished(5000))
         {
            qDebug() << "got response" << reply.returnValue();
         }
         else
         {
            qDebug() << "timeout";
         }
      });
      

      The waitForFinished always end in timeout.

      If we go with a QRemoteObjectPendingCallWatcher to do that asynchronously, it works as expected.

      I guess it's related to the signal "connection" still open while we do the second call or something related to the eventLoop but was not expecting this behavior.

      I attached a small project that show the bug. launch it without argument for the server, with -c for the client (triggering timeouts) and with -c -a for the asynch client (working)

      Is there something that I'm doing wrong or is it a proper bug?

       

        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:
            thelenbertrand Bertrand Thelen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes