Forum: GNU Radio core dumps when using gr.firdes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
141689c528c5212754cbead4acd52b46?d=identicon&s=25 Josh Blum (Guest)
on 2007-05-28 07:32
(Received via mailing list)
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 Blum
D0072e69d706bb3ca211d33a1b536e2c?d=identicon&s=25 Johnathan Corgan (Guest)
on 2007-05-28 07:40
(Received via mailing list)
Josh Blum 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 Corgan
Corgan Enterprises LLC
http://corganenterprises.com
D0072e69d706bb3ca211d33a1b536e2c?d=identicon&s=25 Johnathan Corgan (Guest)
on 2007-05-29 05:45
(Received via mailing list)
Johnathan Corgan 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 Corgan
Corgan Enterprises LLC
http://corganenterprises.com
141689c528c5212754cbead4acd52b46?d=identicon&s=25 Josh Blum (Guest)
on 2007-06-09 07:47
(Received via mailing list)
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)

---   ---
This topic is locked and can not be replied to.