cjcliffe / CubicSDR

Cross-Platform Software-Defined Radio Application
http://www.cubicsdr.com
GNU General Public License v2.0
2.07k stars 257 forks source link

CubicSDR crashes on connection to SoapyServer #947

Open janekska opened 2 years ago

janekska commented 2 years ago

Hi,

So I have SoapySDRServer on RaspberyPi4 and recently compiled CubicSDR on Ubutu 18.

I can start CubicSDR and add a connection to my RaspberyPI and get SDR info, but when I click start button CubicSDR crashes:

me@my-desktop:~$ CubicSDR Loading:: configuration file '/home/janeks/.CubicSDR/config.xml' Loaded 217 rig models via hamlib.

Audio Device #0 Audio Adapter (Unitek Y-247A) Analog Mono Default Output? No Default Input? Yes Input channels: 1 Output channels: 0 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #1 Simultaneous output to Audio Adapter (Unitek Y-247A) Analog Stereo, HD-Audio Generic Analog Stereo Default Output? Yes Default Input? No Input channels: 0 Output channels: 2 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #2 Audio Adapter (Unitek Y-247A) Analog Stereo Default Output? No Default Input? No Input channels: 0 Output channels: 2 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #3 HD-Audio Generic Analog Stereo Default Output? No Default Input? No Input channels: 2 Output channels: 2 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #4 Monitor of Audio Adapter (Unitek Y-247A) Analog Stereo Default Output? No Default Input? No Input channels: 2 Output channels: 0 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #5 Monitor of HD-Audio Generic Analog Stereo Default Output? No Default Input? No Input channels: 2 Output channels: 0 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

Audio Device #6 Monitor Source of Simultaneous output to Audio Adapter (Unitek Y-247A) Analog Stereo, HD-Audio Generic Analog Stereo Default Output? No Default Input? No Input channels: 2 Output channels: 0 Duplex channels: 0 Native formats: 16-bit signed integer. 24-bit signed integer. 32-bit signed integer. 32-bit float normalized between plus/minus 1.0. Supported sample rates: 8000hz 16000hz 22050hz 32000hz 44100hz 48000hz 96000hz 192000hz

SDR enumerator starting. SoapySDR init.. API Version: v0.8.0 ABI Version: v0.8 Install root: /usr/local Loading modules... Available factories...null, remote, rtlsdr Available vertical sync SwapInterval functions: glxSwapIntervalEXT: Yes DRI2SwapInterval: No glxSwapIntervalMESA: No glxSwapIntervalSGI: Yes Using glxSwapIntervalEXT.

Loaded font 'Bitstream Vera Sans Mono' from '/usr/local/share/cubicsdr/fonts/vera_sans_mono12_0.png', parsed 255 characters. Loaded font 'Bitstream Vera Sans Mono' from '/usr/local/share/cubicsdr/fonts/vera_sans_mono16_0.png', parsed 255 characters. Loaded font 'Bitstream Vera Sans Mono' from '/usr/local/share/cubicsdr/fonts/vera_sans_mono18_0.png', parsed 255 characters.

Reporting enumeration complete. SDR enumerator done. Loaded font 'Bitstream Vera Sans Mono' from '/usr/local/share/cubicsdr/fonts/vera_sans_mono24_0.png', parsed 255 characters. Loaded font 'Bitstream Vera Sans Mono' from '/usr/local/share/cubicsdr/fonts/vera_sans_mono27_0.png', parsed 255 characters. SDR enumerator starting.

Enumerating remote address: 192.168.1.164 available = Yes driver = remote label = Generic RTL2832U OEM :: 00000001 manufacturer = Realtek product = RTL2838UHIDIR remote = tcp://192.168.1.164:55132 remote:driver = rtlsdr rtl = 0 serial = 00000001 tuner = Rafael Micro R820T Make device 0 origin=https://github.com/pothosware/SoapyRTLSDR rtl=0

Reporting enumeration complete. SDR enumerator done. SDR thread starting. device init() [INFO] SoapyRemote::setupRxStream(remoteFormat=CS8, localFormat=CF32, scaleFactor=128, mtu=1500, window=44040192) [INFO] Client side stream bound to 192.168.10.5:54218 [INFO] Client side status bound to 192.168.10.5:59290 [INFO] Using format CS8.

[WARNING] StreamEndpoint resize socket buffer: set 43008 KiB, got 176 KiB [INFO] Configured sender endpoint: dgram=1452 bytes, 714 elements @ 2 bytes, window=176 KiB [INFO] Client side stream connected to 192.168.1.164:54653 [INFO] Configured receiver endpoint: dgram=1452 bytes, 714 elements @ 2 bytes, window=43008 KiB OSDRThread : Device Stream set to MTU: 714 starting readLoop() SDRThread::readStream(): 2. SoapySDR read failed with unknown code: -4 SDRThread::readStream(): 3.1 iqDataOutQueue output queue is full, discard processing of the batch... SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSTerminating SDR thread.. SDRThread::readStream(): 3.1 iqDataOutQueue output queue is full, discard processing of the batch... readLoop() ended. ERROR: thread '9SDRThread' has not terminated in time ! (> 3000 ms)

The last output a bit differs from time to time (in backward sequence):

... starting readLoop() SDRThread::readStream(): 2. SoapySDR read failed with unknown code: -4 SDRThread::readStream(): 3.1 iqDataOutQueue output queue is full, discard processing of the batch... SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSUnhandled unknown exception; terminating the application. Aborted (core dumped)

... SDRThread : Device Stream set to MTU: 714 starting readLoop() [ERROR] ~SoapyRPCUnpacker: Unconsumed payload bytes 16 [ERROR] ~SoapyRPCUnpacker: Unconsumed payload bytes 45 Unhandled unknown exception; terminating the application. Aborted (core dumped)

... OSDRThread : Device Stream set to MTU: 714 Terminating SDR thread.. ERROR: thread '9SDRThread' has not terminated in time ! (> 3000 ms)

What could be the reason?

brdgs & looking forward

agilly commented 1 year ago

Hi! Posting here because I have the same issue. I have a SoapyServer running on Ubuntu Server 22.04. That is installed on a LibreComputer Renegade (small SBC, https://libre.computer/products/roc-rk3328-cc/). I am running CubicSDR on Windows on the same LAN. I tried 0.2.3, 0.2.4, 0.2.5 and the latest 0.2.8 v4 windows binaries, all have the same problem. It sees the SoapyServer, but once I click "Start" the app freezes and dies. Here the logs from the SoapyServer side (they don't say much):

######################################################
## Soapy Server -- Use any Soapy SDR remotely
######################################################

Server version: 0.6.0-gf375555e
Server UUID: 20a68c38-e5ee-175a-8567-04d4a8c03901
Launching the server... tcp://[::]:55132
Server bound to [::]:55132
Launching discovery server... 
Connecting to DNS-SD daemon... 
[INFO] Avahi version:  avahi 0.8
[INFO] Avahi hostname: roc-rk3328-cc
[INFO] Avahi domain:   local
[INFO] Avahi FQDN:     roc-rk3328-cc.local
[INFO] avahi_entry_group_add_service(roc-rk3328-cc._soapy._tcp)
Press Ctrl+C to stop the server
SoapyServerListener::accept([::ffff:192.168.1.247]:64021)
Found Rafael Micro R820T tuner
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64022)
SoapyServerListener::accept([::ffff:192.168.1.247]:64023)
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64024)
Found Rafael Micro R820T tuner
SoapyServerListener::close()
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64029)
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64030)
SoapyServerListener::accept([::ffff:192.168.1.247]:64031)
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64032)
Found Rafael Micro R820T tuner
SoapyServerListener::close()
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64033)
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:192.168.1.247]:64034)
SoapyServerListener::accept([::ffff:192.168.1.247]:64035)
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
Disabled direct sampling mode
[R82XX] PLL not locked!
[R82XX] PLL not locked!
Allocating 15 zero-copy buffers
[R82XX] PLL not locked!
SoapyServerListener::accept([::ffff:192.168.1.247]:64037)
SoapyServerListener::close()
SoapyServerListener::handlerLoop() FAIL: SoapyRPCUnpacker::recv(header) FAIL: recv() [104: Connection reset by peer]
SoapyServerListener::handlerLoop() FAIL: SoapyRPCUnpacker::recv(header) FAIL: recv() [104: Connection reset by peer]
SoapyServerListener::close()
SoapyServerListener::close()