[Bug 785] New: Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Summary: Trigger mechanism does not work
Product: Toolchain
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

I have a component which is supposed to trigger itself, and should be executed
by a non-periodic activity:


bool startHook(){
return this->trigger();
}

void updateHook(){
log(Info)<<"Print something"<<endlog();
this->trigger();
}


The component seems to be running from the TaskBrowsers pov:

In Task Robot[R]
</code.

but nothing seems to be printed, is happening? The mechanism worked perfectly
in RTT 1.10 but seems to be broken in RTT 2.0.x

Ruben


[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Peter Soetens <peter [..] ...> 2010-10-22 10:43:27 ---
This bug was fixed with commit 939a7086ab2e1bfb9c4c47ca226edd421d7c66eb and fix
was part of the 2.1.0 release.

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

--- Comment #2 from Peter Soetens <peter [..] ...> 2010-10-11 15:02:10 ---
(In reply to comment #1)
> (In reply to comment #0)
> > I have a component which is supposed to trigger itself, and should be executed
> > by a non-periodic activity:
> >
> > &#10;&gt; &gt; bool startHook(){&#10;&gt; &gt; return this-&gt;trigger();&#10;&gt; &gt; }&#10;&gt; &gt;&#10;&gt; &gt; void updateHook(){&#10;&gt; &gt; log(Info)&lt;&lt;&quot;Print something&quot;&lt;&lt;endlog();&#10;&gt; &gt; this-&gt;trigger();&#10;&gt; &gt; }&#10;&gt; &gt;
> >
> > The component seems to be running from the TaskBrowsers pov:
> > &#10;&gt; &gt; In Task Robot[R]&#10;&gt; &gt; &lt;/code.&#10;&gt; &gt;&#10;&gt; &gt; but nothing seems to be printed, is happening? The mechanism worked perfectly&#10;&gt; &gt; in RTT 1.10 but seems to be broken in RTT 2.0.x&#10;&gt; &#10;&gt; What happens if you call trigger() from within the TB ?&#10;&gt; &#10;&gt; How was start() called ? By the Deployer ?&#10;&gt; &#10;&gt; The initial trigger() in startHook() is too soon in order to have updateHook()&#10;&gt; called. So the EE will execute, but not call updateHook.&#10;&gt; &#10;&gt; If this is your case, we need to adapt the deployer such that it calls the start&#10;&gt; Operation instead of the start() C++ function. We could still force a trigger()&#10;&gt; in the start() function to support the C++ case.&#10;&#10;Correction: this is only true if start() is an OwnThread operation. If it is&#10;tagged as&#10;ClientThread (which it is by default), the TC will not be triggered. This&#10;effectively rules out calling trigger()&#10;from startHook(), which is a serious regression.&#10;&#10;I&#039;ll have to adapt the TaskCore + EE to handle this case.&#10;&#10;Peter&#10;

[Bug 785] Trigger mechanism does not work

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=785

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |peter [..] ...

--- Comment #1 from Peter Soetens <peter [..] ...> 2010-10-11 14:41:24 ---
(In reply to comment #0)
> I have a component which is supposed to trigger itself, and should be executed
> by a non-periodic activity:
>
> &#10;&gt; bool startHook(){&#10;&gt; return this-&gt;trigger();&#10;&gt; }&#10;&gt; &#10;&gt; void updateHook(){&#10;&gt; log(Info)&lt;&lt;&quot;Print something&quot;&lt;&lt;endlog();&#10;&gt; this-&gt;trigger();&#10;&gt; }&#10;&gt;
>
> The component seems to be running from the TaskBrowsers pov:
> &#10;&gt; In Task Robot[R]&#10;&gt; &lt;/code.&#10;&gt; &#10;&gt; but nothing seems to be printed, is happening? The mechanism worked perfectly&#10;&gt; in RTT 1.10 but seems to be broken in RTT 2.0.x&#10;&#10;What happens if you call trigger() from within the TB ?&#10;&#10;How was start() called ? By the Deployer ?&#10;&#10;The initial trigger() in startHook() is too soon in order to have updateHook()&#10;called. So the EE will execute, but not call updateHook.&#10;&#10;If this is your case, we need to adapt the deployer such that it calls the&#10;start Operation instead of the start() C++ function. We could still force a&#10;trigger() in the start() function to support the C++ case.&#10;&#10;This is really an interesting exercise: since start() is an operation, it can&#10;be configured to be executed in ClientThread or OwnThread. Calling plain&#10;C++-&gt;start() ignores this choice. On the other hand, going through the&#10;OperationInterface will respect that choice. So the real bug is in the&#10;deployer, but other legacy code assuming TaskContext::start() will cause&#10;updateHook() to be called will be in trouble too.&#10;&#10;Peter&#10;