Ticket #3220 (closed Bugs: invalid)

Opened 8 years ago

Last modified 8 years ago

Event responded to multiple times in one update

Reported by: anonymous Owned by: andreas_huber69
Milestone: Boost 1.40.0 Component: statechart
Version: Boost 1.39.0 Severity: Problem
Keywords: statechart orthogonal event dispatch Cc:


I have created a state that has three orthogonal regions. This states to an event, evSay, by printing a message. One of the child states posts evSay in its ctor. Instead of the expected message, I get teh message repeated three times.

see attached code


bug.cpp (1.2 KB) - added by anonymous 8 years ago.
code example

Change History

Changed 8 years ago by anonymous

code example

comment:1 Changed 8 years ago by anonymous

  • Status changed from new to closed
  • Resolution set to invalid

The observed behavior is in line with the one specified in the reference:


Line number 38 of bug.cpp currently reads ...

return forward_event();

Replace this with ...

return discard_event();

... and the program should then work as expected.

Note that forward_event() should only be used in cases where a react member function determines that the passed event should be handled either in an outer state or a different orthogonal region.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.