# Hier Block - Message and Stream Ports - Port of Of Range

**URL:** <https://www.ruby-forum.com/t/hier-block-message-and-stream-ports-port-of-of-range/232015>\
**Category:** GNU Radio\
**Created:** [September 13, 2014, 3:01am UTC](https://www.ruby-forum.com/t/hier-block-message-and-stream-ports-port-of-of-range/232015 "2014-09-13T03:01:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 13, 2014, 3:01am UTC](https://www.ruby-forum.com/t/hier-block-message-and-stream-ports-port-of-of-range/232015/1 "2014-09-13T03:01:49Z")

</div>

I have a hier block with a couple of message i/o and complex stream i/o.  
After including the hier block in a top\_block and running, it threw out  
an  
error about input ports being out of range. It turned out that it had  
assigned a port index to a message input, so the stream input had been  
displaced to higher indices that didn’t actually exist in the io\_sig.

As a work around - I deleted all of the pad sinks/source in the GRC  
file,  
added the stream sinks/sources, and then messages, to assure that the  
hier  
block generator assigned stream ports to the lower indices. [ I was a  
little surprised this worked actually].

I can try to track down the cause, but I thought I’d mention it here if  
someone knew exactly where to look.

Or maybe I’m just doing something silly?

-John

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [September 13, 2014, 5:52pm UTC](https://www.ruby-forum.com/t/hier-block-message-and-stream-ports-port-of-of-range/232015/2 "2014-09-13T17:52:48Z")

</div>

On Fri, Sep 12, 2014 at 9:00 PM, John M.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> wrote:

> I can try to track down the cause, but I thought I’d mention it here if  
> someone knew exactly where to look.
> 
> Or maybe I’m just doing something silly?
> 
> -John

I can actually see this being an issue. There is some ambiguity about  
port  
ordering between the message and data ports. We’ve looked at them a bit  
in  
the past for similar bugs, but I can see a problem with hier\_blocks,  
particularly when built in GRC.

Your workaround also doesn’t surprise me 🙂

Tom
