# Re: Gr-Specest: window not passed? \[Solved\]

**URL:** <https://www.ruby-forum.com/t/re-gr-specest-window-not-passed-solved/233792>\
**Category:** GNU Radio\
**Created:** [January 12, 2015, 3:48pm UTC](https://www.ruby-forum.com/t/re-gr-specest-window-not-passed-solved/233792 "2015-01-12T15:48:46Z")\
**Posts on this page:** 1\
**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:** [January 12, 2015, 3:48pm UTC](https://www.ruby-forum.com/t/re-gr-specest-window-not-passed-solved/233792/1 "2015-01-12T15:48:46Z")

</div>

Hi List,

I got the error: welch\_impl.cc:83 std::vector window shadows the  
variable with the same name (l. 81), albeit uninitialized, outside the  
if case.

I will provide a pull request tonight.

Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY

> **[Want to know how to live #LikeABosch?](https://www.bosch.com/)**
>
> Moving stories and inspiring interviews. Experience the meaning of "invented for life" by Bosch completely new. Visit our international website.

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
removed\_email\_address@domain.invalid

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kbel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller

-----Ursprngliche Nachricht-----  
Von: Ludwig Stephan (CR/AEH4)  
Gesendet: Montag, 12. Januar 2015 15:17  
An: removed\_email\_address@domain.invalid; ‘removed\_email\_address@domain.invalid’  
Betreff: Gr-Specest: window not passed?

Hello Moritz,  
Hello List,

I might have found some unintended behaviour in gr-specest. I claim that  
the content of const std::vector &window is not passed in the  
constructor, if called by the GRC block. I cannot explain why and ask  
for hints on how to correct the behavior. I could supply a patch then.

Consider the enclosed diff against the git version of lib/Welch\_impl.cc,  
which basically adds some debugging output. Running this with the  
original GRC block,  
I get the following output:

Window created; size: 2048 (which is my FFT size) =\> the make(…int  
window\_type…) function works correctly  
specest\_check\_arguments\_impl::window.size() = 0 =\> this make(…, const  
std::vector &window) does not get the window’s values  
Constructor: 0 =\> the constructor(…, const std::vector &window)  
does not get the window’s values, either

I suppose that this has something to do with the call-by-reference of  
const std::vector, but I cannot explain why.

Can you confirm this behavior? Could you please help me finding a  
solution for this an let me fix it?

Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY

> **[Want to know how to live #LikeABosch?](https://www.bosch.com/)**
>
> Moving stories and inspiring interviews. Experience the meaning of "invented for life" by Bosch completely new. Visit our international website.

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
removed\_email\_address@domain.invalid

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kbel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller
