State machine crashing #3
Replies: 1 comment 1 reply
-
As you already noticed in the documentation, it makes no sense for a state machine to ask itself "Am I in state XYZ?" (using the Frankly, something like
It is difficult to forbid applications from doing something that makes no sense. For example, how can you ensure that we can't divide by zero, dereference a NULL pointer, or index an array out of bounds? Well, you can't. The best you can do is to assert inside the framework when it detects something illegal. And that's precisely what QP Framework did in this case. You call it "crashing", but this was an assertion, which is very different from a "nebulous crash". An assertion shows you immediately what's wrong so that you can correct it. A "nebulous crash" leaves you completely in the dark. I hope that these comments make sense to you. --MMS P.S. |
Beta Was this translation helpful? Give feedback.
-
Hi.
I'm trying to send some data to my QP application using a control on QView and QSPY. Based on the received data I call the
isIn()
function of theQHsm
to check if the it is in a particular state, before performing an action on the input data. However, the state-machine is crashing on me. When I remove the call to theisIn()
function, it no longer crashes.I came across the following note in the online QP documentation regarding the
isIn()
function:My question is, how can we ensure that we don't call the
isIn(
) function during a transition?Beta Was this translation helpful? Give feedback.
All reactions