Skip to content
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

gracefull handle Midi overflow #825

Merged
merged 2 commits into from Mar 3, 2021
Merged

gracefull handle Midi overflow #825

merged 2 commits into from Mar 3, 2021

Conversation

daschuer
Copy link
Member

This is a simple fix to handle midi overflows gracefully.
Details see: https://bugs.launchpad.net/mixxx/+bug/1527410

This fixes the issue that the midi fix stops after an overflow on nearly all platforms.
Unfortunately in Ubuntu the thing becomes worse due to and exit call.
This is why I change the required potmidi version to > the problematic one.

https://bugs.launchpad.net/mixxx/+bug/1527888
https://bugs.launchpad.net/mixxx/+bug/1097286

IMHO This is merge-able once we have a portmidi version for Ubnutu in our ppa

@rryan
Copy link
Member

rryan commented Dec 31, 2015

Hello! This branch is against the 1.12 branch, which is now closed to any changes except bugfixes. Please re-open your PR against master if this PR is still relevant.

@rryan rryan closed this Dec 31, 2015
@daschuer daschuer reopened this Jan 2, 2016
@daschuer
Copy link
Member Author

daschuer commented Jan 2, 2016

This is a bug-fix ;-)

@rryan
Copy link
Member

rryan commented Jan 4, 2016

The code change looks good to me though I have the same concern about the Debian package change. Instead, let's publish a portmidi package on our PPA compiled in release mode.

@rryan
Copy link
Member

rryan commented Jan 6, 2016

My PPA has a portmidi build with PM_CHECK_ERRORS disabled.
https://launchpad.net/~rryan/+archive/ubuntu/ppa/+packages
If someone could test, that would be great. If it works I can push it to our main PPAs.

@daschuer
Copy link
Member Author

daschuer commented Jan 7, 2016

The package works for me on Precise. However I have tested it without a real controller.

@rryan
Copy link
Member

rryan commented Jan 7, 2016

@daschuer -- could you revert the control file changes?

@daschuer
Copy link
Member Author

daschuer commented Jan 7, 2016

Yes, I can do it, but I want just verify that it is clear for you what it means:
After merging this and without a potmidi update, a Midi overflow and any other midi error will crash Mixxx.
I am not feeling comfortable to allow this. Do you?

@rryan
Copy link
Member

rryan commented Jan 8, 2016

I would rather the user be able to install Mixxx than to add a cryptic package requirement. Based on survey results, 70% of users don't have a MIDI controller. My bet is that most users who hit the dependency error when they download the .deb will give up.

You're probably right that this is not worth doing in 2.0.1 though. Maybe some other day when the Ubuntu situation is better.

@daschuer
Copy link
Member Author

daschuer commented Jan 8, 2016

Ok I will remove the dependency tonight.

We should remove the direct *.deb download link from
http://www.mixxx.org/download/
Or provide libpormidi and libtag there as well.

@daschuer
Copy link
Member Author

daschuer commented Jan 8, 2016

The situation does not change between 2.0.1 or 2.1.0 if we assume that every user installs our libportmidi this fix can go to both. If not, we need to force it by the dependency.

@daschuer
Copy link
Member Author

daschuer commented Jan 8, 2016

By the way: done ;-)

@Be-ing
Copy link
Contributor

Be-ing commented Apr 18, 2018

This pull request has not been updated in years so I am closing it to reduce the clutter of open PRs. IMO if this requires changes to a dependency then we should not merge it until those changes are merged upstream.

@Be-ing Be-ing closed this Apr 18, 2018
@daschuer
Copy link
Member Author

This one is waiting for the Ubuntu situation to go better.
it is fixed from libportmidi 1:217-6

Trusty: 1:200-0ubuntu3
Xenial: 1:200-0ubuntu3
Artful: 1:217-6
Bionic: 1:217-6

Maybe there is a way to detect the version at compile time.

@daschuer daschuer reopened this Apr 18, 2018
@Be-ing Be-ing added stalled and removed stalled labels Apr 18, 2018
@Be-ing Be-ing added this to the stalled milestone Apr 18, 2018
@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Oct 20, 2020
@Holzhaus Holzhaus changed the base branch from 1.12 to 2.3 December 3, 2020 18:40
@Holzhaus
Copy link
Member

Holzhaus commented Dec 3, 2020

This one is waiting for the Ubuntu situation to go better.
it is fixed from libportmidi 1:217-6

Trusty: 1:200-0ubuntu3
Xenial: 1:200-0ubuntu3
Artful: 1:217-6
Bionic: 1:217-6

@daschuer So it's ready to merge for 2.3? We drop support for older distros there.

@daschuer
Copy link
Member Author

daschuer commented Dec 3, 2020

Yes finally. Thank you for the reminder.

@daschuer
Copy link
Member Author

daschuer commented Dec 3, 2020

Done.

@daschuer daschuer modified the milestones: stalled, 2.3.0 Dec 3, 2020
@Holzhaus Holzhaus added this to In progress in 2.3 release via automation Dec 3, 2020
@github-actions github-actions bot removed the stale Stale issues that haven't been updated for a long time. label Dec 4, 2020
@Be-ing Be-ing removed this from In progress in 2.3 release Dec 21, 2020
@Be-ing Be-ing removed this from the 2.3.0 milestone Dec 21, 2020
@Be-ing Be-ing removed the major bug label Dec 21, 2020
@Be-ing Be-ing changed the base branch from 2.3 to main December 21, 2020 16:23
@daschuer daschuer changed the base branch from main to 2.3 January 5, 2021 07:54
@daschuer
Copy link
Member Author

daschuer commented Jan 5, 2021

This is a valid bug-fix. Who likes to have a look?

@daschuer daschuer added this to the 2.3.0 milestone Jan 5, 2021
@Holzhaus Holzhaus self-requested a review January 5, 2021 09:54
@Be-ing
Copy link
Contributor

Be-ing commented Jan 5, 2021

I'm not comfortable rushing this change into an almost ready to be released branch.

@daschuer
Copy link
Member Author

daschuer commented Jan 7, 2021

I'm not comfortable rushing this change into an almost ready to be released branch.

Why are you at this opinion? What is the risky bit here.

The use of poll is here obviously redundant leading to a deadlock in rare cases.
PM_Read contains the same code as PM_Poll
https://github.com/jwinarske/portmidi/blob/a588cf60f47cd6eeb8b1cca09cd9670702731ba3/pm_common/portmidi.c#L374

@Holzhaus
Copy link
Member

Holzhaus commented Feb 5, 2021

@Be-ing if this fixes a known bug we should merge, unless you have evidence that this change might introduce other issues.

@daschuer Is there some way to test this? Code lgtm.

@daschuer
Copy link
Member Author

daschuer commented Feb 5, 2021

You can slow down the polling rate and turn the jog wheel to produce an overflow.
Without the patch midi stops. With the patch it continues.

@daschuer
Copy link
Member Author

daschuer commented Mar 1, 2021

@Holzhaus Did you find time to test this?

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, forgot about this. Thanks for the reminder. Works fine for me. I can't comment about the code though.

@Holzhaus
Copy link
Member

Holzhaus commented Mar 1, 2021

@Be-ing merge?

@Be-ing
Copy link
Contributor

Be-ing commented Mar 1, 2021

I'm still nervous about merging this without a clear way to reproduce the issue and knowing that the MIDI I/O code otherwise has been working well for years. However maybe this addresses the sporadic reports of controllers randomly not working after a while on Windows? So if consensus is to merge this now, I'm not going to insist on holding it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants