rem: if (session_repp != 0) { stop();
add: if (csetup_repp != 0) { command(ECA_ENGINE::ep_exit, 0.0f); wait_for_exit(5);
context: ECA_ENGINE::~ECA_ENGINE(void) {  ecadebug->msg(ECA_DEBUG::system_objects, "(eca-engine) ECA_ENGINE destructor!");  if (session_repp != 0) {    stop();    if (csetup_repp != 0) {      std::vector<CHAIN*>::iterator q = csetup_repp->chains.begin();      while(q != csetup_repp->chains.end()) {	if (*q != 0) (*q)->disconnect_buffer();	++q;      }    }  }  delete impl_repp;  set_status(ECA_ENGINE::engine_status_notready);   ecadebug->control_flow("Engine exiting");}