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.
Thank
you!

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


View this message in context:
http://gnuradio.4.n7.nabble.com/terminate-called-after-throwing-an-instance-of-std-invalid-argument-tp54156.html
Sent from the GnuRadio mailing list archive at Nabble.com.

1 Like

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

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

Shaun,

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

Tom

Thank you so much. Tom

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


View this message in context:
http://gnuradio.4.n7.nabble.com/terminate-called-after-throwing-an-instance-of-std-invalid-argument-tp54156p54164.html
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)
are:

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

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