Large MIDI sysex messages not working on Linux
Categories
(Core :: DOM: Device Interfaces, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: pmatilai, Assigned: gsvelto)
References
(Regressed 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0
Steps to reproduce:
Try to use WebMIDI to send large SysEx MIDI messages. In this particular case I'm trying to use Firefox for managing a Electra One MIDI controller with it's web application, but it's not at all specific to that.
Actual results:
The large sysex message is either truncated or not sent at all, leaving both the web app and the receiving end hanging in the air. Firefox doesn't crash, but obviously things do not work either.
Expected results:
There should be no arbitrary limits to SysEx message sending. These can be very large when uploading/downloading firmware, sample data and whatnot. This issue prevents the use of Firefox for all manner of interesting webmidi-related applications.
This is rather similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1945967, just the platform and thus the underlying libraries involved are different. In the case of Linux it's the midir interface to ALSA that is the issue. The midir version bundled in Firefox is rather old (0.7.0 from 2020), and this particular issue has been fixed in midir upstream couple of years ago already:
https://github.com/Boddlnagg/midir/pull/125
I did a local build of Firefox 132 some months ago with the above patch to confirm it indeed fixed the large sysex issue, but Firefox should really update the bundled midir library to a newer version to gain all the other fixes as well.
Thanks.
Comment 1•8 months ago
|
||
The severity field is not set for this bug.
:cmartin, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•8 months ago
|
||
NI Gabriele for WebMIDI
| Assignee | ||
Comment 3•8 months ago
|
||
Confirming this. I've held back from updating the midir crate because they skipped the windows-sys 0.52 dependency and went straight to 0.56 which we don't have vendored. I can try patching back the crate dependency to 0.52 but I don't think that'll work. There were some significant changes in the external API between those two versions, notably HANDLE is an isize in the old one and a *mut c_void in the new one. Worst case I can fork midir again and use our fork, but I'd rather not go there if I can avoid it.
| Reporter | ||
Comment 4•8 months ago
|
||
Thanks for the detailed response!
Ugh, guess vendored libraries are no panacea either. Some solution - whether a temporary fork for the specific issue or something else - would be much, much appreciated though. For me, this is the only thing I need Chromium for, and you can imagine how annoying it is to have to drag that monster around, especially when you know what a tinyt thing it is code-wise :D Of course this is a bit of a niche thing, but it does keep a number of musicians having to resort to other browsers.
If there's something I can do to help this matter (test a build or something), I'd be happy to.
| Assignee | ||
Comment 5•8 months ago
|
||
I did some checking, tried patching using a windows patch crate to see if I could vendor midir 0.10.1 without changes and it won't work, because there were further changes to HANDLE and its related type (they're now transparent structus, something I had missed). So, the only way to vendor an updated midir is to fork it again, at least until they update their dependencies. I'll give it a spin tomorrow if I have some free time in-between builds.
| Assignee | ||
Comment 6•8 months ago
|
||
| Assignee | ||
Comment 7•8 months ago
|
||
WIP using our vendored branch, I still need to test this on all architectures.
Updated•8 months ago
|
| Assignee | ||
Comment 10•8 months ago
|
||
This should be fixed now, at least in the nightly branch. Panu could you check if it works for you?
| Reporter | ||
Comment 11•8 months ago
|
||
Sure, inteded to test it couple of weeks ago already but there was something strange with that nightly build and didn't have a chance to really figure out whether it already had this fix or not. So, armed with the knowledge it is there now for sure, retrying:
With the latest nightly as of today, the Electra One editor seems to work just fine, whereas it previously choked pretty much on everything. So the operation appears a roaring success. Next stop, ask the Electra developer to drop their nag about using Chrome... once this lands in a release.
Thank you so much!!!
Description
•