[erlang-questions] clarify: R12B0 weird gen_fsm behavior (is it a bug?)

Mateusz Berezecki <>
Fri Feb 1 14:53:29 CET 2008


On Feb 1, 2008, at 2:29 PM, Mateusz Berezecki wrote:

> Hello list readers,
>
> I've encountered a weird gen_fsm behavior.
>
> This is an excerpt of a case clause which gets executed.
> The commented code is not compiled and not executed so
> having {next_state, 'JOINED', State1} goes into next state
> correctly. When I uncomment the code the FSM no longer
> goes into 'JOINED' state but remains in the current state.


while trying to fix this behavior I came back to square one,
where FSM does not change the states at all...


so I have 2 states:
- 'JOINING'
- 'JOINED'

I do the following at the end of the case mentioned in previous e-mail

			State1 = StateData#state{root = R, parent = {Src,Socket}, siblings  
= S, mod_state = ModState},
			{next_state,  
'some_random_state_XXXXX_AAAAA_1111111__222222_whatever', State1};

and this gets executed but FSM  still does NOT change the state...
It even does not complain about this non-existing state as it simply  
does not even attempts transitioning
I am pretty puzzled with this one...

The only thing I know is that the next event coming in in all cases is  
a {tcp, Socket, Data} one.
Does it interfere with FSM in some way or something?

can somebody please help me?


Mateusz Berezecki





More information about the erlang-questions mailing list