Terminate called after throwing an instance of 'std::invalid_argument'

Hello Everyone

When I run AM radio GRC, I got this error
terminate called after throwing an instance of ‘std::invalid_argument’
what(): buffer_add_reader: nzero_preload must be >= 0

I google this error, and it says this is bug 693. but I cannot fix it.

Shaun AM_test.grc

View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.

1 Like

On Fri, Jun 12, 2015 at 1:32 AM, shaunwang [email protected]

Shaun AM_test.grc <http://gnuradio.4.n7.nabble.com/file/n54156/AM_test.grc


You need to specify taps for the filter in the Frequency Xlating FIR
block. It’s a flaw in the validation step of GRC that it doesn’t
check that a vector is empty. But the filter won’t work without you
defining it.


Thank you so much. Tom

Could you please tell me what a typical value in tabs is?

View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.

Dear Shaunwag,

that depens on the bandwidth you want to let through your filter, but
typically, use something like

firdes.low_pass(1.0, samp_rate, 25e3, 25e3)

which will build a tap vector for you; the arguments (in this order)

  1. gain in passband
  2. sampling rate
  3. cutoff frequency of pass band in Hz
  4. transition with between pass- and stop band

Generally, you should have a bit of fun with the tool that you as
“gr_filter_design”; it gives you a good feeling for what kind of filters
make sense (e.g. when you try to filter out 25kHz out of a 10MHz input
stream with a single FIR filter using the method described above, you’d
get a ~1000 taps filter. And no noone should expect their CPU to compute
that in real time.), and where you can allow your filter to have a bit
more of “slack”.

Best regards,

how to create taps? and how to add it?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs