# Is there possible to have item drops?

**URL:** <https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544>\
**Category:** GNU Radio\
**Created:** [October 15, 2014, 6:08pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544 "2014-10-15T18:08:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 15, 2014, 6:08pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/1 "2014-10-15T18:08:56Z")

</div>

Hi all,

It seems this is a ridiculous question, however, I didn’t find any  
solution  
for my problem.

I have already a bunch of custom blocks connected to each other which  
play  
role as a transmitter (tx). I want to connect tx to a fir filter by  
using  
fir\_filter\_ccc block. I set the filter taps with specific ones. I also  
have  
this filter in Matlab. The output of the filter is connected to a sink  
file.

When I see the output (tx) and filtering it by Matlab and comparing it  
with  
the output of the gnuradio filter, I see both of the following:

1. Both matlab and gnuradio filtered output, have little difference in a  
range of 0.01. (I’m using gr\_complex data).

2. After a while, Matlab output and GNURadio’s output will differ as  
high  
as 1000 in magnitude!!

I guess, there is item drops in this filtering. I know, the probability  
of  
this event is so weak, anyway, item drop even can happen in GNURadio?

Where is my problem?

Best,  
Mostafa

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [October 15, 2014, 7:35pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/2 "2014-10-15T19:35:23Z")

</div>

Hello Mostafa,

filtering is a inherently lossy operation: it’s an operation that  
involves multiplication and addition of floating point numbers.  
Matlab internally uses double (float64) values, whereas GNU Radio,  
usually, uses single precision (float32) numbers for performance  
reasons.  
Now, without knowing what kind of signal you are filtering with what  
kind of taps you are using with what kind of GNU Radio filters and what  
Matlab functions, there’s nothing to guess on how these differences  
occur.  
What I _can_ say though is that I’ve never seen an item drop in GNU  
Radio’s runtime, and we have strong tests against that. Now, it’s  
entirely possible that any of our filter implementations might have  
bugs, but I kind of doubt that. It’s most probably simply numeric  
accuracy that kills your samples.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [October 16, 2014, 1:48pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/3 "2014-10-16T13:48:12Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [October 16, 2014, 2:47pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/4 "2014-10-16T14:47:45Z")

</div>

I’m a bit confused. Your diagram

TX-\>FIR-\>…  
-\>Filesink

Indicates that TX is a source, whereas TX usually is an information sink  
in DSP. Maybe you want to fill us in about the type of block TX is?

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [October 16, 2014, 10:04pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/5 "2014-10-16T22:04:10Z")

</div>

Tx is an abbreviation of tx blocks! 🙂

I finally found the problem! I used heap memory but I never release it  
in  
different blocks! So during the runtime, the memory allocation get the  
error: “std::bad\_alloc” after somewhile. Now this is fine.

Thank you too much,  
Best,  
Mostafa

On Thu, Oct 16, 2014 at 4:16 PM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> something
> 
> > Best,
> > 
> > > multiplication and addition of floating point numbers.  
> > > entirely
> > > 
> > > role as a transmitter (tx). I want to connect tx to a fir filter by
> > > 
> > > 1. Both matlab and gnuradio filtered output, have little difference in a  
> > > Where is my problem?

–

* * *

Department of Electrical Engineering  
Aboureyhan Building  
MMWCL LAB  
Amirkabir University Of Technology  
Tehran  
IRAN  
Tel: +98 (919) 158-7730  
LAB: [http://ele.aut.ac.ir/~mmwcl/?page\_id=411](http://ele.aut.ac.ir/~mmwcl/?page_id=411)  
Homepage: [http://ele.aut.ac.ir/~alizadeh/](http://ele.aut.ac.ir/~alizadeh/)

* * *

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [October 16, 2014, 10:26pm UTC](https://www.ruby-forum.com/t/is-there-possible-to-have-item-drops/232544/6 "2014-10-16T22:26:12Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On 16.10.2014 22:02, Mostafa A. wrote:

> Tx is an abbreviation of tx blocks! 🙂  
> That still doesn’t make sense! 🙂  
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1

iQEcBAEBAgAGBQJUQCmHAAoJEAFxB7BbsDrLQs0H/R4afmR6XubcaN1qJAleVqiJ  
Av6jkaWf1aNBMqoYgmoBjj8Ad4Hwkek5Uz7TElMtSkpxtlRwcdayXyoTprh0X5yD  
yKiIK1nizSdoddsagZv3DngI3XPaLhrOtg9C6OJwHTXNSdSFyGP8I0cPeCTw+Vtm  
XgektLgKZEJBiujbLhu3Sr3rMN5deI9KcONkiza8wEduuG4UzFyqrOUBqgZ91kmT  
MoEjoP0cH4xdOviLfHs6r+SFauP9ov2UA+nf/jvhYV208jOY4+txnmeHJFh+f+qk  
wy0dqNEa6Ccip6SZdL90wRjZOue1bye2js6uM18HEpGCu8dUcu9aT68WdHPL3LY=  
=mt/k  
-----END PGP SIGNATURE-----
