Heterogeneous block io signature and QA

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
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

On Wed, Mar 6, 2013 at 2:16 AM, Bastian B.
[email protected] wrote:

did you forget the return statement in get_in_size() or can you omit that?

Yes! Thanks Bastian! Everything is looking good now.