-
Notifications
You must be signed in to change notification settings - Fork 26
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
[BUG] Dropped messages when large numbers of messages are received. #362
Comments
Am I understanding your report correctly that all 10,000 messages were sent to the hardware and then received back from the hardware? Or are you showing that message number 10,000 was received? If you are just looking to see the last message was sent/received, it's possible that messages in the middle were not sent or received. We'd need to see an actual count to be sure. |
Note that I cannot currently test this, as I do not have any MIDI 2.0 UMP USB High Speed devices and there are none on the market, so I'll need to rely on @m-komo for any further testing. |
I confirmed that there are no dropped messages on the USB transaction. I'll do further investigation. |
Note that new model implemented, if there is no room in the receive buffer (ie not serviced fast enough) we drop message. I am looking into how to give useful messages in logs to get more information. Cannot put log message for every dropped message, that would just cause too many messages and not be useful. I will also look to trying on a STM32 device I have on hand which gives me High Speed. |
Montage M v2.0 is USB MIDI 2.0 High Speed device, but I'm not sure if Montage M can loop-back from In to Out... |
@Psychlist1972 To Reproduce:
I confirmed that there are no dropped messages on the USB transaction. In addition, if UM-ONE is working with the USB MIDI 2.0 driver (UsbMidi2.sys), I could not see any dropped messages. |
FWIW, this is what I see UM-One, and with 50k messages Ahh. But I see now that even though it is in class-compliant mode, the Roland driver was picked up. I'll need to try with the in-box driver. So I just tried with the iConnectivity mio, which is using our older class driver (all the service code is the same for talking with the roland driver and with the older class driver. The only way to run different service code is to use the MIDI 2 driver) and I see it did drop a bunch of messages. It stops almost immediately after the first console (the sender) completes. I've run it several times now, and the same thing happens each time. In case your numbers look different from mine, note that I've made some changes recently that may impact that:
This appears to be a new failure. I'll investigate further. I'm running some traces now. Thanks. |
Here are my findings so far:
I've verified that it's not a problem with a device being closed too early by the service, or anything similar to that. I've also verified that all 500 messages are sent to the driver. So from this initial testing, it appears that some devices, or our in-box MIDI 1.0 driver, may just not be able to handle the messages at the rate we're sending. I'm looking to see if there's any way to detect that. I'm still investigating, as some things here don't quite make sense. |
FWIW, for example using a MIDIMAN 2x2 and DIN loop back OUT A to IN A by a cable, sending lot of messages, causes drops at the (USB) receiving end . When connecting OUT A to IN B, no drops occur. so that is definitely an issue with the interface and it's code structure. i tested it also with ALSA and QSYNTH (GM2 soundfount) loopback playing a big MIDI file. (is there any windows GM sound generator equivalent ?) . Do wonder if the UM-1 can handle large and fast data. Assume this shorting pin is the pin from MIDI In/OUT? For single DIN interfaces, used a Focusrite Audio interface by connecting OUT to IN and no drops occurred sending data to and receiving data back via USB. |
@MusicMaker Thank you for your comment.
I captured USB log and confirmed that there are no dropped messages on the USB transaction. |
I have been able to reproduce this issue on my USB High-speed device with USB MIDI 2.0 driver(UsbMidi2.sys). I couldn't reproduce 'midi ep send 0x40123456 0x00000000 -p 0 -i -c 10000' with my equipment, I have confirmed that no messages are dropped on USB transaction. My Windows version is My driver version is as follows. |
FYI, I ran a similar test on MacOS Sonoma, but it didn't reproduce. |
FWIW . Configured a high speed MPU based legacy device running a Linux kernel 6.1 and MIDI as a device. Connected it via USB to a PC and loaded MIDI2 (DP 2) driver in Windows. Sending messages with 0 delay goes fine but up to around 1200 and start to fail at around 1500. Adding a delay of 1 msec for MIDI2.0 the result is good even up to 10000 . That transfer took 2 min 40 seconds. is, Used arecordmidi -n 10000 . This tool will stop receiving once the legacy MIDI event count reaches 10000 so if it did not, should point to missed messages or other issues. I don't have a newer USB driver to test as others seem to have. Using Dev preview 6. |
Describe the bug
Dropped messages were observed when monitoring thousands of messages from a USB High-speed device.
It could not be reproduced with the ProtoZOA (Full-speed device).
To Reproduce
Sending messages completed in a short period, but some dropped messages were observed on the monitor.
Expected behavior
All messages are received and displayed on the monitor.
Screenshots
I have attached the captured USB log (USBLog.zip).
Installer Name or Version
Desktop (please complete the following information):
Device information, if this is with an external MIDI device:
Application Information
The text was updated successfully, but these errors were encountered: