# Re: Error in hier block with 4 outputs and an async message!

**URL:** <https://www.ruby-forum.com/t/re-error-in-hier-block-with-4-outputs-and-an-async-message/238848>\
**Category:** GNU Radio\
**Created:** [January 31, 2014, 12:23am UTC](https://www.ruby-forum.com/t/re-error-in-hier-block-with-4-outputs-and-an-async-message/238848 "2014-01-31T00:23:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 31, 2014, 12:23am UTC](https://www.ruby-forum.com/t/re-error-in-hier-block-with-4-outputs-and-an-async-message/238848/1 "2014-01-31T00:23:36Z")

</div>

Marcus,

the error is still there even if you don’t have direct connections  
between  
in/out pads.

See attached

Achilleas

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [January 31, 2014, 12:41am UTC](https://www.ruby-forum.com/t/re-error-in-hier-block-with-4-outputs-and-an-async-message/238848/2 "2014-01-31T00:41:07Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Ok, Now I can reproduce your problem.  
But I do get (in contrast to your error message because of connecting  
a block to itself):  
Traceback (most recent call last):  
File “/home/marcus/top\_block.py”, line 74, in   
tb = top\_block()  
File “/home/marcus/top\_block.py”, line 32, in **init**  
self.test\_msg\_hier\_0 = test\_msg\_hier()  
File “/home/marcus/.grc\_gnuradio/test\_msg\_hier.py”, line 38, in  
**init**  
self.connect((self.blocks\_complex\_to\_mag\_0\_0\_0, 0), (self, 4))  
File  
“/home/marcus/.usrlocal/lib64/python2.7/site-packages/gnuradio/gr/hier\_block2.py”,  
line 75, in connect  
self.\_connect(points[i-1], points[i])  
File  
“/home/marcus/.usrlocal/lib64/python2.7/site-packages/gnuradio/gr/hier\_block2.py”,  
line 81, in \_connect  
dst\_block.to\_basic\_block(), dst\_port)  
File  
“/home/marcus/.usrlocal/lib64/python2.7/site-packages/gnuradio/gr/runtime\_swig.py”,  
line 2890, in primitive\_connect  
return \_runtime\_swig.hier\_block2\_sptr\_primitive\_connect(self, \*args)  
ValueError: destination port 4 out of range for test\_msg\_hier(1)

Which fits quite well into your observation that there is a lack of  
order in the output.

As it seems, the output signature of your hier block is 4 streams,  
which is correct.  
So I guess GRC is getting the hiccups because the message stream is  
not the last pad; I think they’re ordered alphabetically. Can you give  
the block an id like zzzz\_zzzz\_verylast? does that help?

Greetings,  
Marcus

On 31.01.2014 00:22, Achilleas A. wrote:

> Marcus,
> 
> the error is still there even if you don’t have direct connections  
> between in/out pads.
> 
> See attached
> 
> Achilleas

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJS6uLIAAoJEAFxB7BbsDrLGtUIAKYeM9Kv/cr/SwkL1dEI6Vqn  
KExN/jXG5FOTHWW9wNP1ctO94x8u+Ard/j4KZ1qkr1SEvlvwe9ZW+7+R9KGXy0nm  
LK3XRr7PlSr+CRXPFcYigFcFGaev12EDMudD7Ulx6DOHVSrw2FBg7gUpiqHA6FfX  
I0f72L1/1zC0JamVp/+27+Mjv+BsOsBjcQj45deKHsnR+FFHEaxOVaTQXMiIqZUI  
5SsSj7AVMAzKg+p8JLEq7S2js2ozObNSvUB3S7DooHpSW/xIxx23JiAzVcByhKBa  
6IbIkD2/1pekQx+qyo+kJ67qbPVS2JppHXaHEqj/ke24XP2wfDHPImNYndeHX2E=  
=NOd2  
-----END PGP SIGNATURE-----
