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

QRemoteObjectReplica's state assertion fails when remote object reconnects

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes