-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Mixxx stops receiving data from MIDI controllers when too many messages arrive at once #8381
Comments
Commented by: Pegasus-RPG Found that MIXXX_PORTMIDI_BUFFER_LEN was set too low at 64. After setting it to 1024 and letting Mixxx run for awhile and doing latency-inducing actions (like switching to a text console,) the highest number of queued events was 135, so I'm going to propose setting it to 256. |
Commented by: Pegasus-RPG Actually after some stress-testing, 500 events were queued up at one point, so maybe 1024 is a good number to use. |
Commented by: Pegasus-RPG |
Commented by: ywwg For the record the portmidi header does describe how a caller is supposed to recover from overflow. If we aren't detecting overflow that's a bug as well: /* Pm_Read() retrieves midi data into a buffer, and returns the number
|
Commented by: Pegasus-RPG Good point, and that starts to answer my question of if this is the best fix. I suspect we're just bailing out, assuming any error is an unrecoverable one. Should we target this to 2.1 then? |
Commented by: ywwg I think upping the buffer size is a good stop-gap fix, but yeah in 2.1 we should try to be able to handle this situation more gracefully. |
Commented by: daschuer I can confirm the issue with my RMX2 when I am reduce the buffer to 2 |
Commented by: daschuer We use a redundant Pm_Poll call that prevents that we can recover from an overflow. If I remove the Pm_Poll call and use a portmidi build without PM_CHECK_ERRORS all works like a charm and overflows are handled gracefully. |
Issue closed with status Fix Released. |
Reported by: Pegasus-RPG
Date: 2015-12-17T23:08:41Z
Status: Fix Released
Importance: Medium
Launchpad Issue: lp1527410
Tags: controllers, midi
Testing with a Stanton SCS.1d on Debian 8 Linux where it shows up as a regular but extremely chatty MIDI controller,
if anything happens on my system to cause a slight delay (such as scrolling the library,) and too many MIDI message build up in the receive queue, Mixxx drops the ball and stops responding to the controller at all. It can still send things to the controller and the GUI remains responsive, it just stops getting data from the controller unless I disable and re-enable it.
I'm not sure if this is happening at the PortMIDI or ALSA-MIDI levels instead of Mixxx either. How can I best check?
I just got this, but it was after I stopped execution for a few seconds in gdb then continued:
Expression 'alsa_snd_pcm_prepare( stream->playback.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2920
Expression 'AlsaStart( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3246
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3313
Expression 'PaAlsaStream_HandleXrun( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3924
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4253
[Thread 0x7fff8e24a700 (LWP 21672) exited]
The text was updated successfully, but these errors were encountered: