Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][msm] std::vector<MyStateMachine> generate stack overflow
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2011-05-18 18:58:43


>
>
> I'd be quite surprised that it has much to do with the vector. I tried
> for security on a tutorial and all works ok.
> I'd more likely suspect an incorrect state machine definition, but
> without code I cannot help you much.
>

I agree that i might have missed something, I was trying to setup the
simplest state machine I could with only two states and one transition.

I attached the full project (vs2010 files included) to this email.

Just to point the potential problem, I defined the state machine class
(RealStateMachine) this way :

    class StateMachine
        : public boost::msm::front::state_machine_def< StateMachine >
    {
    public:

        typedef State_HelloWorld initial_state;

        struct transition_table : public boost::mpl::vector
            <
                _row< State_HelloWorld, event::exit, State_Exit >
>
        {};

        StateMachine();
        ~StateMachine();
    };

    class RealStateMachine
        : public boost::msm::back::state_machine< StateMachine >
    {
    public:

    };

Joël Lamotte.





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net