[boost-users][StateChart] failure during termination

Hello, When trying to terminate an asynchronous_state_machine I get the error message: "Expression: list iterator not decrementable". This occures in state_machine::terminate_impl( state_base_type & theState, bool performFullExit ) in the line: else if ( currentStates_.begin() == --currentStatesEnd_ ), when trying to perform --currentStatesEnd_, as currentStatesEnd_== 0xcdcdcdcd (i.e. uninitialized). theState == outermost state of the machine. I believe the problem is actually somewhere in my own code, so my question is what it could be, according to the above symptom? I request the termination in the following way: struct ServerImpl { //.... shared_ptr<state_chart::fifo_scheduler<> > sessionScheduler_; state_chart::fifo_scheduler<>::processor_handle sessionProcessor_; ~ServerImpl() { // the scheduler resides in some pool, so it continues living after ~ServerImpl sessionScheduler_->terminate_processor(sessionProcessor_); } Thank you, Igor'.

I found the problem. I was making shared_ptr's of my state machine, so it's life-time was managed both by shared_ptr, and by the state-chart framework, which led to double destruction...
participants (1)
-
Igor R