# Message Strobe Block Stopping Unexpectedly

**URL:** <https://www.ruby-forum.com/t/message-strobe-block-stopping-unexpectedly/241609>\
**Category:** GNU Radio\
**Created:** [April 18, 2015, 11:12pm UTC](https://www.ruby-forum.com/t/message-strobe-block-stopping-unexpectedly/241609 "2015-04-18T23:12:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 18, 2015, 11:12pm UTC](https://www.ruby-forum.com/t/message-strobe-block-stopping-unexpectedly/241609/1 "2015-04-18T23:12:31Z")

</div>

I’m having a problem with the Message Strobe block. I have a simple  
flowgraph, which can be found here: [\<?xml version='1.0' encoding='ASCII'?\>\<?grc format='1' created='3.7.6'?\>\<flo - Pastebin.com](http://pastebin.com/WCa5npiP)

There are two independent dataflows in the flowgraph:  
Flow 1:  
noise source → throttle → selector(w /wx chooser) → null sink

```
 -> null sink

```

Flow 2:  
message strobe(w /wx chooser) → message debug

Both the “message” in the message strobe and output index of the  
selector  
are wx chooser controlled.

I am able to change the “message” fine, but when I change the output  
index  
of the selector of a running flow, the stop method of the message strobe  
gets called.

Why is this happening and can I prevent it? I want the messages to  
continue.

Im using GNU-Radio: 3.7.6.1 (built from “build-gnuradio”)

-Travis

---

<div class="post-metadata">

**Author:** ![Travis\_Collins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6f9a4e/32.png) [@Travis\_Collins](https://www.ruby-forum.com/u/Travis_Collins)\
**Post date:** [April 19, 2015, 11:06am UTC](https://www.ruby-forum.com/t/message-strobe-block-stopping-unexpectedly/241609/2 "2015-04-19T11:06:17Z")

</div>

Hi Travis,

stop() is called on all gr::blocks in your flow graph when you change  
(ok, even when you just set it to the old index) selector’s  
configuration, because it reconfigures the flow graph internally,  
meaning that it calls lock() and unlock() on a hier block, which stop()s  
the parent hier\_block, or top\_block if it’s already the highest level of  
encapsulation.  
So that is correct behaviour, in principle. However, message strobe  
doesn’t seem to be able to get up again:

```
bool
message_strobe_impl::stop()
{
  // Shut down the thread
  d_finished = true;
  d_thread->interrupt();
  d_thread->join();

  return block::stop();
}

```

since start() doesn’t re-set d\_finished, we now know what needs to be  
done to correct this:  
move the setting of d\_finished from the constructor to start().

I have a fix for this; for me, it works with your flow graph. If you  
want to try:  
[https://github.com/marcusmueller/gnuradio/tree/message\_strobe\_fix\_restartable](https://github.com/marcusmueller/gnuradio/tree/message_strobe_fix_restartable)

Best regards,  
Marcus
