Core dumps when using gr.firdes

Hello,

I am having core dumps when using the taps generators in the gr.firdes
package. The core dumps happen when I give the functions invalid
arguments. Example:

gr.firdes.complex_band_pass(0, 0, 0, 0, 0)
terminate called after throwing an instance of ‘std::out_of_range’
what(): gr_firdes check failed: sampling_freq > 0
Aborted (core dumped)

Although I should obviously not be doing that: I am trying to add the
taps generating functions to the math expression parser in GRC. However,
if a user enters a bad argument, I should be able to catch the error,
but currently, the entire program will crash!

Help please,
-Josh B.

Josh B. wrote:

taps generating functions to the math expression parser in GRC. However,
if a user enters a bad argument, I should be able to catch the error,
but currently, the entire program will crash!

This will need to be fixed in the SWIG wrapper(s) for gnuradio-core, to
have the check for these exceptions and pass them up to Python instead
of aborting. Please file a Trac bug.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com

Johnathan C. wrote:

This will need to be fixed in the SWIG wrapper(s) for gnuradio-core, to
have the check for these exceptions and pass them up to Python instead
of aborting. Please file a Trac bug.

A trial fix for this was checked into the trunk this morning Please
update and let me know how it goes.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com

Hello,

Despite the trial fix, I still get core dumps.

I decided to try other functions that are supposed to throw an error:
The gr.correlate_access_code_bb constructor is suppose to throw a
std::out_of_range when the length of the code is greater than 64: sure
enough, this crashes the python shell just as the firdes.

Is something wrong with swig? I am using SWIG Version 1.3.31 and trunk
r5754.

-Josh

— Example: —
gr.correlate_access_code_bb(“0000000000000000000000000000000000000000000000000000000000000000000000”,
1)
gr_correlate_access_code_bb: access_code is > 64 bits
terminate called after throwing an instance of ‘std::out_of_range’
what(): access_code is > 64 bits
Aborted (core dumped)