sonosaurus / sonobus

Source code for SonoBus, a real-time network audio streaming collaboration tool.
https://sonobus.net
GNU General Public License v3.0
1.55k stars 114 forks source link

if start in jack mode, but jack isn't running, then try to change from jack to alsa, then get crash #84

Open ericfont opened 3 years ago

ericfont commented 3 years ago

I had previously used sonobus in jack mode. But I started sonobus just now wihout starting jack first. I was able to press the cogwheel in sonobus and see that sonobus was still set in JACK mode from previous session. I click on that drop-down menu to change from JACK to ALSA, but when I clicked ALSA, sonobus crashed:

[e@Ryzen5-Radeon560 SonoBus_artefacts]$ ./Standalone/sonobus Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock !! killing thread by force !! FATAL: exception not rethrown Aborted (core dumped)

ericfont commented 3 years ago

can reproduce again. (SonoBus was still set in jack mode cause the SonoBus settings file of course wasn't able to save as alsa). I'm noticing there is a few seconds of SonoBus frozen after I click ALSA, and then the FATAL exception happens.

attached are the SonoBus settings I had that produce the crash, so I can reproduce later: SonoBus.settings.zip

ericfont commented 3 years ago

hmm... even after rmdir .config/sonobus, I still get crash...this time direclty on boot even without the GUI fully initializing:

[e@Ryzen5-Radeon560 Standalone]$ ./sonobus Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock !! killing thread by force !! FATAL: exception not rethrown Aborted (core dumped)

ericfont commented 3 years ago

hmm...started jack now, redid rmdir .config/sonobus, but I still get the crash...so it is almost like the crash is not with using JACK, but rather is with using ALSA?

[e@Ryzen5-Radeon560 Standalone]$ ./sonobus !! killing thread by force !! FATAL: exception not rethrown Aborted (core dumped)

ericfont commented 3 years ago

maybe I build the new develop branch wrong? :/

ericfont commented 3 years ago

Well this issue was reporducing. But then upon resuming my computer from sleep, or for whatever other reason, it is starting now without crashing:

20:26:44: Debugging starts
JUCE v6.0.7
resized: 128  128
resized: 128  128
resized: 128  128
resized: 128  128
resized: 128  128
resized: 128  128
resized: 128  128
Read bar sound of 1401 samples
Read beat sound of 1332 samples
aoo: registered codec 'pcm'
aoo: registered codec 'opus'
Bound system chosen udp port to 36476
state key: filterStateXML
state key: audioSetup
state key: shouldOverrideSampleRate
state key: shouldCheckForNewVersion
state key: allowBluetoothInput
state key: recentSetupFiles
state key: lastRecentsSetupFolder
state key: windowX
state key: windowY
state key: windowW
state key: windowH
Loaded recent setups: 
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Unable to connect to JACK server
SETSTATE: <?xml version="1.0" encoding="UTF-8"?>

<SonoBusAoO>
  <PARAM id="defPeerLevel" value="1.0"/>
  <PARAM id="defnetauto" value="2.0"/>
  <PARAM id="defnetbuf" value="0.001000000047497451"/>
  <PARAM id="defsendqual" value="4.0"/>
  <PARAM id="dry" value="0.0"/>
  <PARAM id="dynamicresampling" value="0.0"/>
  <PARAM id="hearlatencytest" value="0.0"/>
  <PARAM id="ingain" value="1.00000011920929"/>
  <PARAM id="inmonmonopan" value="0.0"/>
  <PARAM id="inmonpan1" value="-1.0"/>
  <PARAM id="inmonpan2" value="1.0"/>
  <PARAM id="mainreverbdamp" value="0.5"/>
  <PARAM id="mainreverbenabled" value="0.0"/>
  <PARAM id="mainreverblevel" value="0.06259999424219131"/>
  <PARAM id="mainreverbmodel" value="1.0"/>
  <PARAM id="mainreverbpredelay" value="20.0"/>
  <PARAM id="mainreverbsize" value="0.1500000059604645"/>
  <PARAM id="mastinmute" value="0.0"/>
  <PARAM id="mastmonsolo" value="0.0"/>
  <PARAM id="mastrecvmute" value="0.0"/>
  <PARAM id="mastsendmute" value="0.0"/>
  <PARAM id="metenabled" value="0.0"/>
  <PARAM id="metgain" value="0.4999999701976776"/>
  <PARAM id="metisrecorded" value="1.0"/>
  <PARAM id="mettempo" value="100.0"/>
  <PARAM id="reconnectlast" value="0.0"/>
  <PARAM id="sendchannels" value="1.0"/>
  <PARAM id="sendfileaudio" value="0.0"/>
  <PARAM id="sendmetaudio" value="0.0"/>
  <PARAM id="syncMetHost" value="0.0"/>
  <PARAM id="wet" value="0.9999999403953552"/>
  <RecentConnections/>
  <ExtraState UseUdpPort="0" ChangeQualForAll="0" ChangeRecvQualForAll="0"
              DefaultRecordingOptions="1" DefaultRecordingFormat="2" DefaultRecordingBitsPerSample="16"
              DefaultRecordDir="/home/e/Music/SonoBus" SliderSnapToMouse="1"
              PeerDisplayMode="0" lastChatWidth="250" lastChatShown="0" chatFontSizeOffset="0"
              chatFixedWidthFont="0" linkMonDelayTimes="1" lastUsername=""
              langOverrideCode="" lastWindowWidth="800" lastWindowHeight="600"
              autoDropRateThresh="0.2000000029802322"/>
  <InputChannelGroups numChanGroups="0"/>
  <PeerStateCacheMap/>
</SonoBusAoO>

resized: 128  128
Couldn't find mapping for lang: American English-United States  region: United States displang: American English-United States  - resname: localized_american english_txt
get typeface for font <Sans-Serif>
Creating custom typeface!!
RESIZED to 800 600
Error creating Aoo Server: 21845
resized: 800  600
resized: 800  600
resized: 800  600
Got settings click
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Unable to connect to JACK server
callout bounds: 50 18 66 14
setting parent changed: 0
Got settings click
callout bounds: 50 18 66 14
ericfont commented 3 years ago

actually although it started fine with JACK (am running in qtcreator debug mode), however it did crashe when I changed from JACK to ALSA:

image

ericfont commented 3 years ago

It works fine as long as JACK is up. However, still the moment I change sonobus' cogwheel from JACK to ALSA, it it crashes again, with same stack trace.

For the record, here is JACK's error log at the time of changing SonoBus from JACK to ALSA:

21:01:15.282 JACK connection graph change.
21:01:15.432 JACK connection change.
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:capture_1' to [dis]connect
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:capture_2' to [dis]connect
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:capture_3' to [dis]connect
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:capture_4' to [dis]connect
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:playback_1' to [dis]connect
Tue Apr  6 21:01:15 2021: ERROR: Failed to find port 'system:playback_2' to [dis]connect
Tue Apr  6 21:01:15 2021: Client 'SonoBus' with PID 33312 is out
ericfont commented 3 years ago

I can reporduce it, with same output. I should not that those Jack error log messages are printed when clicking ALSA and SonoBus freezes at that point. However, the SonoBus doesn't shut down till a few seconds later.

ericfont commented 3 years ago

based on the state of others threads which are in JUCE library when this crash happens...so I'm suspecting that this crash is most likely a problem for JUCE to fix if they would fix it.

I don't know why I didn't have this error happening before, but I do have a slightly different setup of audio interfaces now.

essej commented 3 years ago

Problems in JUCE can be fixed by anyone, yay open source!