Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to trigger an event from a message on a topic? #260

Closed
romainreignier opened this issue Mar 10, 2022 · 2 comments
Closed

How to trigger an event from a message on a topic? #260

romainreignier opened this issue Mar 10, 2022 · 2 comments

Comments

@romainreignier
Copy link

I would like to trigger an event on message reception on a topic with an empty message type.

I have than created a client:
cl_empty_subscriber.hpp

#pragma once
#include <smacc2/client_bases/smacc_subscriber_client.hpp>
#include <std_msgs/msg/empty.hpp>

namespace sm_sub_example
{
namespace cl_empty_subscriber
{
class ClEmptySubscriber : public smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::Empty>
{
public:
  ClEmptySubscriber(const std::string& _topic_name)
  : smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::Empty>(_topic_name)
  {
  }
};
}  // namespace cl_empty_subscriber
}  // namespace sm_sub_example

Then a client behavior that do nothing special because as I understand, SmaccSubscriberClient already triggers an EvTopicMessage:
cb_empty_subscriber_behavior.hpp

#pragma once
#include "sm_sub_example/clients/cl_empty_subscriber/cl_empty_subscriber.hpp"

namespace sm_sub_example
{
namespace cl_empty_subscriber
{
class CbEmptySubscriberBehavior : public smacc2::SmaccClientBehavior
{
public:
  typedef std_msgs::msg::Empty TMessageType;

  void onEntry() { }
};
}  // namespace cl_empty_subscriber
}  // namespace sm_sub_example

Now, an orthogonal that set the topic:
or_empty_subscriber.hpp

#pragma once
#include <smacc2/smacc.hpp>
#include "sm_sub_example/clients/cl_empty_subscriber/cl_empty_subscriber.hpp"

namespace sm_sub_example
{
class OrEmptySubscriber : public smacc2::Orthogonal<OrEmptySubscriber>
{
public:
  void onInitialize() override { auto client = this->createClient<cl_empty_subscriber::ClEmptySubscriber>("/next"); }
};
}  // namespace sm_sub_example

In the state machine declaration (from sm_atomic example), I only add the creation of the orthogonal:

this->createOrthogonal<OrEmptySubscriber>();

And in the st_state_1.hpp, I add the transition and the configure_orthogonal statements:

#pragma once
#include <smacc2/smacc.hpp>

namespace sm_sub_example
{
using namespace cl_empty_subscriber;
using namespace smacc2::default_transition_tags;

struct State1 : smacc2::SmaccState<State1, SmAtomic>
{
  using SmaccState::SmaccState;

  typedef mpl::list<

    Transition<EvTopicMessage<CbEmptySubscriberBehavior, OrEmptySubscriber>, State2, SUCCESS>

    >reactions;


  static void staticConfigure()
  {
    configure_orthogonal<OrEmptySubscriber, CbEmptySubscriberBehavior>();
  }

  void runtimeConfigure() {}

  void onEntry() { RCLCPP_INFO(getLogger(), "On Entry!"); }

  void onExit() { RCLCPP_INFO(getLogger(), "On Exit!"); }
};
}  // namespace sm_sub_example

Am I missing something?

When I run this simple example, I get a Segmentation Fault that looks like #259

Output
$ ros2 run sm_sub_example sm_sub_example_node
1646937059.280354 [0] sm_sub_exa: selected interface "lo" is not multicast-capable: disabling multicast
[INFO] [1646937059.284953181] [SmAtomic]: Creating State Machine Base: /SmAtomic
[INFO] [1646937059.285102664] [SmAtomic]: [sm_sub_example::OrTimer] creating client object, type:'cl_ros_timer::ClRosTimer' object tag: 'sm_sub_example::OrTimer'
[INFO] [1646937059.285158359] [SmAtomic]: sm_sub_example::OrTimer Orthogonal is created
[INFO] [1646937059.285179008] [SmAtomic]: [sm_sub_example::OrEmptySubscriber] creating client object, type:'sm_sub_example::cl_empty_subscriber::ClEmptySubscriber' object tag: 'sm_sub_example::OrEmptySubscriber'
[INFO] [1646937059.285206713] [SmAtomic]: [smacc2::ClientHandler<sm_sub_example::OrEmptySubscriber, sm_sub_example::cl_empty_subscriber::ClEmptySubscriber>] Subscribing to topic: /next
[INFO] [1646937059.285652758] [SmAtomic]: sm_sub_example::OrEmptySubscriber Orthogonal is created
[INFO] [1646937059.285678535] [SmAtomic]: [SmaccStateMachine] Introspecting state machine via typeWalker
[INFO] [1646937059.285710092] [SmAtomic]: Creating State Info: sm_sub_example::State1
[INFO] [1646937059.285750100] [SmAtomic]: EXECUTING ONDEFINITION: sm_sub_example::State1
[INFO] [1646937059.286240445] [static]: [states walking] State State1client behavior count: 1
[INFO] [1646937059.286253281] [SmAtomic]: State N14sm_sub_example6State1E Walker has transition list
[WARN] [1646937059.306842751] [SmAtomic]:
[INFO] [1646937059.306972472] [SmAtomic]: State sm_sub_example::State1 Walker transition: smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >
[INFO] [1646937059.307012790] [SmAtomic]: State sm_sub_example::State1 Walker transition: smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >
[INFO] [1646937059.307036157] [SmAtomic]: Transition tag: smacc2::default_transition_tags::SUCCESS
[INFO] [1646937059.307072050] [SmAtomic]: Creating State Info: sm_sub_example::State2
[INFO] [1646937059.307113725] [SmAtomic]: EXECUTING ONDEFINITION: sm_sub_example::State2
[INFO] [1646937059.307628383] [static]: [states walking] State State2client behavior count: 1
[INFO] [1646937059.307641225] [SmAtomic]: State N14sm_sub_example6State2E Walker has transition list
[INFO] [1646937059.313064223] [SmAtomic]: State sm_sub_example::State2 Walker transition: cl_ros_timer::EvTimer<cl_ros_timer::CbTimerCountdownOnce, sm_sub_example::OrTimer>
[INFO] [1646937059.313089327] [SmAtomic]: State sm_sub_example::State2 Walker transition: cl_ros_timer::EvTimer<cl_ros_timer::CbTimerCountdownOnce, sm_sub_example::OrTimer>
[INFO] [1646937059.313110395] [SmAtomic]: Transition tag: smacc2::default_transition_tags::SUCCESS
Backtrace
#0  0x0000555555695ab8 in __gnu_cxx::__normal_iterator<std::shared_ptr<smacc2::introspection::TypeInfo>*, std::vector<std::shared_ptr<smacc2::introspection::TypeInfo>, std::allocator<std::shared_ptr<smacc2::introspection::TypeInfo> > > >::__normal_iterator (this=0x7ffff5256bc0, __i=<error reading variable>) at /usr/include/c++/9/bits/stl_iterator.h:807
#1  0x00005555556912bc in std::vector<std::shared_ptr<smacc2::introspection::TypeInfo>, std::allocator<std::shared_ptr<smacc2::introspection::TypeInfo> > >::begin (this=0x0) at /usr/include/c++/9/bits/stl_vector.h:809
#2  0x000055555568dc23 in std::vector<std::shared_ptr<smacc2::introspection::TypeInfo>, std::allocator<std::shared_ptr<smacc2::introspection::TypeInfo> > >::front (this=0x0) at /usr/include/c++/9/bits/stl_vector.h:1121
#3  0x000055555568943a in smacc2::introspection::SmaccStateInfo::declareTransition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > > (this=0x7ffff007e490,
    dstState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 4, weak count 1) = {...}, transitionTag="smacc2::default_transition_tags::SUCCESS", transitionType="smacc2::default_transition_tags::SUCCESS", history=false, transitionTypeInfo=std::shared_ptr<smacc2::introspection::TypeInfo> (empty) = {...})
    at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:263
#4  0x0000555555684213 in smacc2::introspection::processTransitionAux<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS> (
    sourceState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 5, weak count 1) = {...}, history=false, transitionTypeInfo=std::shared_ptr<smacc2::introspection::TypeInfo> (empty) = {...}) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:226
#5  0x000055555567ec2e in smacc2::introspection::processTransition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS> (t=0x0,
    sourceState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 5, weak count 1) = {...}) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:190
#6  0x0000555555678421 in smacc2::introspection::processTransitions<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function> > (sourceState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 5, weak count 1) = {...}) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:344
#7  0x0000555555671a93 in smacc2::introspection::AddTransition::operator()<smacc2::introspection::type_<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function> > > (this=0x7ffff5258070) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:416
#8  0x000055555566cba7 in boost::mpl::aux::for_each_impl<false>::execute<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<1l>, smacc2::introspection::type_<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function> >, boost::mpl::l_end> >, boost::mpl::l_iter<boost::mpl::l_end>, boost::mpl::identity<mpl_::na>, smacc2::introspection::AddTransition> (f=...) at /usr/include/boost/mpl/for_each.hpp:78
#9  0x0000555555667efa in boost::mpl::for_each<boost::mpl::l_item<mpl_::long_<1l>, smacc2::introspection::type_<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function> >, boost::mpl::l_end>, boost::mpl::identity<mpl_::na>, smacc2::introspection::AddTransition> (f=...) at /usr/include/boost/mpl/for_each.hpp:105
#10 0x0000555555662ca9 in boost::mpl::for_each<boost::mpl::l_item<mpl_::long_<1l>, smacc2::introspection::type_<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function> >, boost::mpl::l_end>, smacc2::introspection::AddTransition> (f=...) at /usr/include/boost/mpl/for_each.hpp:118
#11 0x000055555565e904 in smacc2::introspection::processTransitions<boost::mpl::list<smacc2::Transition<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > >, sm_sub_example::State2, smacc2::default_transition_tags::SUCCESS, boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >, &boost::statechart::detail::no_context<smacc2::default_events::EvTopicMessage<sm_sub_example::cl_empty_subscriber::CbEmptySubscriberBehavior, sm_sub_example::OrEmptySubscriber, std_msgs::msg::Empty_<std::allocator<void> > > >::no_function>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> > (
    sourceState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 5, weak count 1) = {...}) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:168
#12 0x000055555565a2ec in smacc2::introspection::WalkStatesExecutor<sm_sub_example::State1>::walkStates (parentState=std::shared_ptr<smacc2::introspection::SmaccStateInfo> (use count 5, weak count 1) = {...}, rootInitialNode=true) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:461
#13 0x0000555555657c87 in smacc2::introspection::SmaccStateMachineInfo::buildStateMachineInfo<sm_sub_example::State1> (this=0x7ffff007ef40) at /home/rre/victor_ws/install/smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp:470
#14 0x0000555555656c82 in smacc2::ISmaccStateMachine::buildStateMachineInfo<sm_sub_example::State1> (this=0x7ffff0000b60) at /home/rre/victor_ws/install/smacc2/include/smacc2/impl/smacc_state_machine_impl.hpp:601
#15 0x00005555556554b9 in smacc2::SmaccStateMachineBase<sm_sub_example::SmAtomic, sm_sub_example::State1>::initiate_impl (this=0x7ffff0000b60) at /home/rre/victor_ws/install/smacc2/include/smacc2/smacc_state_machine_base.hpp:75
#16 0x000055555563e18b in boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > >::initiate (this=0x7ffff0000e40) at /usr/include/boost/statechart/event_processor.hpp:44
#17 0x0000555555637d9a in boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >::initiate_processor_impl (this=0x7fffffffcfa8, processor=...)
    at /usr/include/boost/statechart/processor_container.hpp:397
#18 0x000055555564e12c in boost::_mfi::mf1<void, boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >, boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > const&>::operator() (this=0x5555557a39d0, p=0x7fffffffcfa8, a1=...) at /usr/include/boost/bind/mem_fn_template.hpp:165
#19 0x000055555564b79a in boost::_bi::list2<boost::_bi::value<boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >*>, boost::_bi::value<boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > > >::operator()<boost::_mfi::mf1<void, boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >, boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > const&>, boost::_bi::list0> (this=0x5555557a39e0, f=..., a=...) at /usr/include/boost/bind/bind.hpp:319
#20 0x0000555555648788 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >, boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > const&>, boost::_bi::list2<boost::_bi::value<boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >*>, boost::_bi::value<boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > > > >::operator() (this=0x5555557a39d0) at /usr/include/boost/bind/bind.hpp:1294
#21 0x0000555555643fe1 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf1<void, boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >, boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > const&>, boost::_bi::list2<boost::_bi::value<boost::statechart::processor_container<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, boost::function0<void>, std::allocator<boost::statechart::none> >*>, boost::_bi::value<boost::weak_ptr<std::auto_ptr<boost::statechart::event_processor<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> > > > > > > >, void>::invoke (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:158
#22 0x0000555555621fbb in boost::function0<void>::operator() (this=0x7ffff52594d0) at /usr/include/boost/function/function_template.hpp:763
#23 0x0000555555631211 in boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >::operator() (this=0x7fffffffcfd8, maxItemCount=0) at /usr/include/boost/statechart/fifo_worker.hpp:134
#24 0x000055555562b9b3 in boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >::operator() (this=0x7fffffffcfa0, maxEventCount=0) at /usr/include/boost/statechart/fifo_scheduler.hpp:187
#25 0x0000555555658688 in boost::_mfi::mf1<unsigned long, boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, unsigned long>::operator() (this=0x5555557c9ca8, p=0x7fffffffcfa0, a1=0) at /usr/include/boost/bind/mem_fn_template.hpp:165
#26 0x00005555556573d5 in boost::_bi::list2<boost::_bi::value<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >*>, boost::_bi::value<int> >::operator()<unsigned long, boost::_mfi::mf1<unsigned long, boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, unsigned long>, boost::_bi::list0> (this=0x5555557c9cb8, f=..., a=...) at /usr/include/boost/bind/bind.hpp:309
#27 0x0000555555655e96 in boost::_bi::bind_t<unsigned long, boost::_mfi::mf1<unsigned long, boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, unsigned long>, boost::_bi::list2<boost::_bi::value<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >*>, boost::_bi::value<int> > >::operator() (this=0x5555557c9ca8) at /usr/include/boost/bind/bind.hpp:1294
#28 0x0000555555653b6a in boost::detail::thread_data<boost::_bi::bind_t<unsigned long, boost::_mfi::mf1<unsigned long, boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >, unsigned long>, boost::_bi::list2<boost::_bi::value<boost::statechart::fifo_scheduler<boost::statechart::fifo_worker<std::allocator<boost::statechart::none> >, std::allocator<boost::statechart::none> >*>, boost::_bi::value<int> > > >::run (this=0x5555557c9b70) at /usr/include/boost/thread/detail/thread.hpp:120
#29 0x00007ffff78cc43b in ?? () from /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0
#30 0x00007ffff794a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#31 0x00007ffff75e8293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
@pabloinigoblasco
Copy link
Contributor

Hello.
Thanks for your report.
The development process you are following in your code looks fine to me.

As in the other issue, there were a regression in the code that should be already fixed.
Please do not hesitate to ask again if something wrong keeps happening.

@romainreignier
Copy link
Author

Thank you for your answer and for fixing the issue.
Nonetheless, in the above example, the event does not seem to be triggered.
Do I need to add some implementation in my subscriber client in order to manually signal the event?
I have thought that SmaccSubscriberClient already handles that. Is it the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants