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

QRemoteObjectReplica's state assertion fails when remote object reconnects



    • Bug
    • Status: Closed
    • P3: Somewhat important
    • Resolution: Done
    • 5.9.1
    • 5.11
    • Remote Objects
    • None
    • N/A


      When a QRemoteObjectHost connects to a QRemoteObjectNode for the second time (for example after a crash or a system reboot) all previously connected QRemoteObjectReplicas will crash with following error:

      ASSERT: "m_state < QRemoteObjectReplica::Valid" in file qremoteobjectreplica.cpp, line 160Debug Error! Program: C:\Qt\5.9.1\msvc2015\bin\Qt5Cored.dllModule: 5.9.1File: global\qglobal.cppLine: 3049 ASSERT: "m_state < QRemoteObjectReplica::Valid" in file qremoteobjectreplica.cpp, line 160{{}}

      Steps to reproduce the error

      1. Set up a very simple QRemoteObject host and node (or source and replica) just like the SimpleSwitch example from the documentation.
      2. Start the source application.
      3. Start the replica application.
      4. Source and replica should start to synchronize.
      5. Quit the source application.
      6. Restart the source application. <- replica application will crash.

      Note that I am aware that at step (5) the replica will signal a stateChanged() from Valid to Suspect allowing to delete the replica instance and replace it with a new one (if needed), but I would like to point that leaving a dangling QRemoteObject instance should be a well-formed application too.

      I think that if it is not possible to reset and re-initialize a Suspect instance, it should be simply left disconnected.


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



            bstottle Brett Stottlemyer
            paolo Paolo Bernini
            1 Vote for this issue
            6 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes