Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.3
-
None
-
f9a17d7f0f02f7af849afdf653a763ffdaf78a1b 8efcfda41f98af51c5d7ab72b5bc38926e9c3f11
Description
Assume following setup:
QStates
s1, s2, s3
QSignalTransitions
t1: s1->s2 and t2: s2->s3
t1 and t2 are triggered by objects of other thread than QStateMachine ones
Then this is possible:
The state machine makes the transition from s1 to s2 because t1 was triggered,
and while the state machine is busy with t1 the signal which should trigger t2
is also emitted by an object (this is possible because the emitting object runs in a other thread).
But because the connections of t2 to the signal is not created until s2 is
entered, the signal for t2 is ignores and silently dropped. The state machine will never leave t2.
Therefore QSignalTransition could not be used in a multi-threaded environment.
This looks like a big error in the QSignalTransition design.
A bug fix would be to also queue signals of QSignalTransition even when the source state is not active.