# Probable bug in simple\_flowgraph

**URL:** <https://www.ruby-forum.com/t/probable-bug-in-simple-flowgraph/111450>\
**Category:** GNU Radio\
**Created:** [August 7, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/probable-bug-in-simple-flowgraph/111450 "2007-08-07T14:36:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@Dominik\_A](https://www.ruby-forum.com/u/Dominik_A)\
**Post date:** [August 7, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/probable-bug-in-simple-flowgraph/111450/1 "2007-08-07T14:36:55Z")

</div>

Hi!

Probably, I have found a bug in the way you create buffers for outgoing  
block connections.

First, this is what I have:  
A hier-block2, with a gr\_block inside, encapsulating some computations.  
Inner connections: self.connect(self, ofdm\_preamble, self)  
where ofdm\_preamble is a gr\_block of mine.  
ofdm\_preamble uses set\_output\_multiple (set to 12) and set\_relative\_rate  
(value: 1.2). The streamsize is 512. It takes 10 vectors, and outputs 12  
vectors of size 512 each.  
The preceding block is an instance of gr.fft\_vcc(). Streamsize is the  
same. The IFFT block is connected to the hierarchical block.

Running the system, I get the following:  
sched: \<gr\_block gr\_ofdm\_preamble (23)\> is requesting more input data  
than we can provide.  
ninput\_items\_required = 10  
max\_possible\_items\_available = 7  
If this is a filter, consider reducing the number of taps.

With max\_possible\_items\_available = buf\_size-1, the allocated output  
buffer of the ifft-block can contain 8 items (vectors).

Now, in  
gr\_simple\_flowgraph\_detail::allocate\_buffer(…)  
you go through each downstream block to ensure that the output buffer is  
“at least twice their decimation factor\*output\_multiple”.  
In my situation, ofdm\_preamble is the downstream block of ifft-block,  
which results in a buffer size of at least 20 (2 \* output\_multiple \*  
decimation\_factor = 2 \* 12 \* (1/1.2)).

But, and that’s the bug I suppose (I am not sure about that, since I  
didn’t go through all your code), the warning indicates the buffer size  
to be 8 items.

I am using Debian. Under Windows/MinGW, everything is fine (I think it’s  
due to memory allocation granularity).

Greetings  
Dominik

---

<div class="post-metadata">

**Author:** ![Dominik\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@Dominik\_A](https://www.ruby-forum.com/u/Dominik_A)\
**Post date:** [August 8, 2007, 11:37am UTC](https://www.ruby-forum.com/t/probable-bug-in-simple-flowgraph/111450/2 "2007-08-08T11:37:18Z")

</div>

Hi!

There is a new ticket regarding this issue.

[http://gnuradio.org/trac/ticket/164](http://gnuradio.org/trac/ticket/164)

Greetings, Dominik
