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

qtremoteobject remote signal connected to remote slot timeout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.5, 6.2.2
    • Remote Objects
    • None
    • Ubuntu 20.04
    • 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

            bstottle Brett Stottlemyer
            thelenbertrand Bertrand Thelen
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes