[MSM] stack overflow happens when there is a false-guard anonymous transition

Hello guys, I met a stack overflow crash in the following MSM sample (boost 1.44). struct Some_Event {}; struct State0 : public msm::front::state<> {}; struct State1 : public msm::front::state<> {}; struct State2 : public msm::front::state<> {}; struct State_Machine_ : public msm::front::state_machine_def< State_Machine_
{ typedef State0 initial_state; template< typename Event > bool is_possible( const Event& ) { return false; } struct transition_table : public mpl::vector< _row< State0, Some_Event, State1 >, g_row< State0, msm::front::none, State2, &State_Machine_::is_possible >
{}; };
struct State_Machine : public msm::back::state_machine< State_Machine_ > {}; void main() { State_Machine state_machine; state_machine.start(); state_machine.process_event( Some_Event() ); } When start() got called in main(), it will enter a endless reentering between state_machine::process_event() and state_machine::handle_eventless_transitions_helper::process_completion_event(). Finally it caused a stack overflow. Could somebody please help me to fix this problem? Many thanks! Regards, Tang
participants (1)
-
Tang Jiang Jun