discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] OOT module with a vector input/output gives an as


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] OOT module with a vector input/output gives an assertion failure
Date: Mon, 20 Feb 2017 00:39:47 +0100
User-agent: K-9 Mail for Android

1. Make sure you're not mixing up vectors and individual elements. You must return the number of vectors you've produced, not the number of gr_complexes these contain.
2. Separately calling consume_each and returning the same value looks like you should have used a sync block (with a work function) instead of a general block (with a general_work function). If you're already actually using a work/sync block, then returning a number implicitly consumes! In that case, you're consuming twice the amount of items you should.

Best regards,
Marcus

Am 19. Februar 2017 21:34:00 MEZ schrieb Damindra Bandara <address@hidden>:
Hi,

I am trying to create an OOT module with a vector input. I haven't implemented the signal processing yet. This is how my code looks like.


I/O signature

gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len),
              gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len))

In the work function,

const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];

 consume_each (noutput_items);
 return noutput_items;

When the fft_len is set to 1, the block runs without any errors. However, when I set the fft_len to some value greater than 1, it fails with the following error.

python2: /usr/local/src/gnuradio/gnuradio-runtime/include/gnuradio/buffer.h:179: unsigned int gr::buffer::index_add(unsigned int, unsigned int): Assertion `s < d_bufsize' failed.

I appreciate if you could give me some guidance to get this fixed.

Thanks,
Damindra

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]