Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1
-
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
- Set up a very simple QRemoteObject host and node (or source and replica) just like the SimpleSwitch example from the documentation.
- Start the source application.
- Start the replica application.
- Source and replica should start to synchronize.
- Quit the source application.
- 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.