-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR crashes when new program connects to JACK system output #250
Comments
[Synchronizer::ReadVideoFrame] Warning: Video buffer overflow, some frames will be lost. The audio input seems to be too slow. [Synchronizer::ReadVideoFrame] Warning: Video buffer overflow, some frames will be lost. The audio input seems to be too slow. That's your problem How to fix it I have no idea It is most likely a issue with LMMS or a hardware issue What kind of computer do you have? this also might be caused by extreme recording speeds that cause the slow down, I'm no expert so don't ask me! |
Never mind about the computer question I can see that in the thing that you posted |
Sounds like LMMS is killing any running JACK server and starting its own. Perhaps you could try running LMMS first, and then seeing if it works? Or maybe the "record speakers" thing is breaking - if so, you may want to manually hook stuff up. I suggest qjackctl for that. |
I suspect it's a problem with "record speakers". Maybe some kind of race condition, possibly inside JACK since it appears to kill the server. If you run JACK from a terminal, do you see any error messages from the server? |
I tried to see if JACK reports something, but I couldn't reproduce the crash yet. |
Out of curiosity, are you using jack1 or jack2? |
JACK1 I've reported a related issue in LMMS project. It's not exactly this, but I mention the trouble. |
Have you tried to reproduce this with JACK2? If JACK2 is unaffected, then the bug is likely inside the JACK server or library. |
I haven't. Sounds like I'd need my backup to recover after swiching from
|
My personal experience is JACK1 tends to be more stable than JACK2. There's a chance that LMMS may require some JACK2 specifics, though. |
I've now captured a 2+ hour material with SSR and jack_capture for audio. Maybe the code of jack_capture could be helpful, as it managed greatly to capture all sound from start to end, even though LMMS have disconnected and reconnected to JACK numerous times, and even crashed a few times in the process. jack_capture still recorded all audio like it was connected to a hardware audio port. SSR also did great job, when I disabled audio capture at all. Here's jack_capture: https://github.com/kmatheussen/jack_capture |
If you record with SSR and you uncheck 'record system speakers', does it still crash? Or do you actually have to disable 'record audio' completely? I suspect the crash happens in JACK itself. The code in SSR that handles this is relatively simple, I can't think of a way it could crash like this. I will take a look at jack_capture to see if they do anything significantly different. Edit: interestingly, jack_capture does not go with the obvious solution (jack_set_port_connect_callback) and instead manually scans the connection graph after every single change. Maybe the author was aware of this bug and did this as a workaround? |
I did some more testing, it seems I can make JACK lock up quite easily just by connecting/disconnecting too many clients per second. It looks like JACK can't handle more than a few dozen events per second, otherwise it starts printing various weird error messages and eventually just freezes. This happens even without SSR, but then the number of events needed to cause the problem is much higher. SSR seems to have made the problem worse because I was holding a lock inside the 'connection change' callback and holding the same lock when calling JACK to change my own connections. Apparently JACK is designed to wait until applications have processed notifications, which can lead to a deadlock situation: SSR can't process notifications while changing connections, and JACK can't change connections when it is still trying to send notifications. I still haven't figured out how this can lead to a crash. All I can tell is that the crash happens inside the JACK library and messes up the stack so much that I can't see a backtrace anymore. Anyway, I changed the JACK input a bit so it doesn't hold the lock anymore while changing the connections. This seems to fix the problem - I can't make SSR or the JACK server lock up anymore unless I use an insane number of connections (~hunderds of new streams per second). @unfa Could you please try to compile the latest SSR from source, and tell me whether this fixes the bug? I would like to test this change before I do a new release and update the PPA. |
I had the same problem in a different scenario (aplay through jack plugin popping up every few seconds). |
I've started SSR, started the capture and run LMMS.
SRR crashes the moment I run LMMS.
The same happens when I start playback in Audacity (it creates a new set of ports for every playback operation).
However after a moment it stopped, and Audacity play doesn't crash SSR.
I had an alsa_in process running and I thought it might cause this, but I re-run it and the problem didn't come back. Then it comes back again. SSR crashes even when recording is off (paused), and I play a sound from Audacity.
Here's console output:
And here's at Audacity's playback:
The text was updated successfully, but these errors were encountered: