gqrx-sdr / gqrx

Software defined radio receiver powered by GNU Radio and Qt.
http://gqrx.dk
GNU General Public License v3.0
3.07k stars 542 forks source link

DSP freeze and device lost after sample rate change #1003

Closed vladisslav2011 closed 2 years ago

vladisslav2011 commented 2 years ago

When the sample rate (or filter bandwidth) is changed in running state, the DSP freezes with the following error log:

SaveConfig
New LNB LO: 0 Hz
saveSettings *** FIXME_ SQL on/off
New FFT rate: 25 Hz
Loading configuration from: "/home/vlad/.config/gqrx/default.conf"
Configuration file: "/home/vlad/.config/gqrx/default.conf"
Set input device:
  old: rtl=0
  new: rtl=0
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.11
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp 
Using device #0 Realtek RTL2838UHIDIR SN: 00000013
usb_claim_interface error -6

FATAL: Failed to open rtlsdr device.

Trying to fill up 1 missing channel(s) with null source(s).
This is being done to prevent the application from crashing
due to gnuradio bug #528.

New antenna selected: ""
********************
********************
Set output device:
   old: 
   new: 

Failed to set RX input rate to 2.4e+06
Your device may not be working properly.

Reproduced with Hackrf one, RTL-SDR. System: Ubuntu 18.04.6 LTS Gqrx was built from source from current git with g++-7 (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0. Git head at build time was at 2172ef1a96d33a81675678033dc5e81f2761fe1e.

Steps to reproduce:

  1. Select a real device (RTL-SDR for example)
  2. Start DSP, adjust gain, tune to some frequency, set up demodulator and waterfall, etc
  3. Open the device dialog and change the input rate (for example. Changing buffers/bias without changing device triggers the bug too)
  4. Confirm changes

Expected behavior: Sample rate is changed, DSP restarts with new sample rate, waterfall/panadapter continues to update with new data, sound continues to output (if tuned frequency is still in new bandwidth)

Observed behavior: Sample rate is changed, DSP stops, starting DSP does not show nor waterfall/panadapter with new data, nor sound.

argilo commented 2 years ago

This issue is a duplicate of #757. The root cause was a bug in GNU Radio, which I fixed in https://github.com/gnuradio/gnuradio/pull/3184. The fix was applied to GNU Radio 3.8 and later.