# Heterogeneous block io signature and QA

**URL:** <https://www.ruby-forum.com/t/heterogeneous-block-io-signature-and-qa/227167>\
**Category:** GNU Radio\
**Created:** [March 6, 2013, 9:05am UTC](https://www.ruby-forum.com/t/heterogeneous-block-io-signature-and-qa/227167 "2013-03-06T09:05:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![laserwhit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@laserwhit](https://www.ruby-forum.com/u/laserwhit)\
**Post date:** [March 6, 2013, 9:05am UTC](https://www.ruby-forum.com/t/heterogeneous-block-io-signature-and-qa/227167/1 "2013-03-06T09:05:26Z")

</div>

I’m trying to make a block with mixed input types. Something along the  
lines of:  
if somebyte = x  
do foo to complex input, send to complex output  
else // somebyte = y  
do bar to complex input, send to complex output

I thought I figured out the io signature because it compiled, but it’s  
doing a core dump starting the block during QA testing. I’ve attached  
some relevant code with some variable changes to hopefully keep it a  
little easier to read:

> <https://gist.github.com/n-west/5097491>

I think this is the specific error: “”“/usr/bin/python: free():  
invalid pointer: 0x0a858ce0 \*\*\*”“”

I’ve grepped around the source tree and used gr\_vector\_map and  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide](http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide)  
to try to get the io signature correct. That same url (I know it’s  
outdated but it’s the only thing I could find talking about mixed type  
inputs) mentions overloading start(), but I haven’t seen any other  
blocks that do that.

For the sake of actually having questions:  
a) Does it look like the io signature is ok?  
b) Any idea on how to go about fixing this?

-Nathan

---

<div class="post-metadata">

**Author:** ![laserwhit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@laserwhit](https://www.ruby-forum.com/u/laserwhit)\
**Post date:** [March 7, 2013, 2:39am UTC](https://www.ruby-forum.com/t/heterogeneous-block-io-signature-and-qa/227167/2 "2013-03-07T02:39:29Z")

</div>

On Wed, Mar 6, 2013 at 2:16 AM, Bastian B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> did you forget the return statement in get\_in\_size() or can you omit that?

Yes! Thanks Bastian! Everything is looking good now.
