Monitor O's and U's from Python

2023-04-21 Thread Richard Bell
Hello, I have a python flowgraph that transmits data from one radio to another for a research project. Sometimes during one of these tx/rx events, U's or O's will occur, making the data invalid. I would like to monitor the USRP for these events from within Python so I can request a retransmit when

Re: Monitor O's and U's from Python

2023-04-21 Thread Marcus Müller
Hello Richard, For RX / "O": you can observe the RX timestamps (key: rx_time) in tags, and compare with the last tag you saw, to check whether the difference of `rx_time` value times the sampling rate is the same as the difference in tag offset (i.e., sample number on which the tag was). For

Re: libgnuradio-runtime problem when capturing GNSS signals with HackRF and gnss-sdr

2023-04-21 Thread Marcus Müller
Hi, the GR version you report to have installed (3.10.1) and the version of libgnuradio-runtime (3.10.6git) differ: I think you're trying to mix different versions of GNU Radio, and especially, try to load a library (libgnuradio-osmosdr.so) that was linked against a different version of GNU Rad

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Marcus Müller
Hi Grace, reading this backtrace, the error happens in #29 0x7fffe99b04d5 in gr::customModule::probeExtract_impl::ApplyFilterBank So, that's where you need to look, not sure whether the other code you shared helps. But reading your other code: you seem to be making an FFT plan and destroy

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Grace Yeung
Hi Marcus, Here is the ForwardFT() code below that is called by ApplyFilterBank() in the work function. So does it mean I should compute the plan only once in the constructor and use it throughout the work function by passing it to the ForwardFT() funciton? And declare _plans in the impl.h fi

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Grace Yeung
Thank you Marcus for taking the time to look through the backtrace error. ApplyFilterBank simply calls ForwardFT to perform the FFT and does not access the plan. It only uses the FFT output. I had to destroy the plan each time because I noticed memory was consistently growing when gnuradio was

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Marcus Müller
You leaking memory if you don't destroy plans is not surprising. It still makes no sense how you make an array, just to throw it away, as explained in my previous email. Your code really is not sensible, sorry! Best regards, Marcus On 21.04.23 17:20, Grace Yeung wrote: Thank you Marcus for tak

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Marcus Müller
Hi Grace, as said, this code shows that you don't understand how long (or rather: short) the object `plans` lives! This is a basic C++ issue: things created in local scope of a function end to exist at the end of the function. (I honestly think you'll need a bit of a better introduction to C++

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Grace Yeung
Thank you Marcus. Yes, the double free error is gone now that I create the plan just once in the beginning. Thank you for your patience. Grace On 4/21/23 12:30, Marcus Müller wrote: You leaking memory if you don't destroy plans is not surprising. It still makes no sense how you make an array,

Re: get_tags_in_range vs get_tags_in_window

2023-04-21 Thread Marcus Müller
Hello Jason, no, there's no benefit. `get_tags_in_window` just calls `get_tags_in_range`; citing: gnuradio/gnuradio-runtime/lib/block.cc: void block::get_tags_in_window(std::vector& v, unsigned int which_input, uint64_t start,

Re: double free or corruption error when two instances of an OOT block using fftw is called in GRC

2023-04-21 Thread Grace Yeung
Got it. Thank you so much, Marcus!! Grace On 4/21/23 13:20, Marcus Müller wrote: Hi Grace, as said, this code shows that you don't understand how long (or rather: short) the object `plans` lives! This is a basic C++ issue: things created in local scope of a function end to exist at the end o