-
Notifications
You must be signed in to change notification settings - Fork 28
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] MidiSrv gets stuck when MIDI messages are received through a MidiSrv enumerated port. #432
Comments
FWIW, just installed pocketMIDI 1.7.0. using custom MIDI 2.0 USB device using the MIDI 2 rev 1.0.7 driver. The device sends UMP packets, (note on/off etc.. no sysex). Midi .exe receives them well , pocket MIDI receives some of the legacy packets after selecting the device and then freezes. Interestingly PocketMIDI seems to sees the UMP device, but MIDI-OX does not. |
I have just completed a series of tests that to me points to the service or supportive applications in DP7, and not the driver. Systems in test: Using the UM-One and testing with Pocket MIDI application on all platforms with the test file provided, here is my results:
It is also important to note, I noticed latency in using the services in this testing. You can visually see that the MIDI In Monitor is lagging the Out Monitor with loopback. When services removed, hard to see any lag. @Psychlist1972 please assign appropriately to have investigated further outside of driver. At this time I do not think it is a driver issue. |
There's a kernel bugchk in the stack dump reported as associated with this, that appears to be from a driver call. I pasted a screen shot. Root cause or not, the driver needs to be hardened to prevent that. That would come out from the fuzz testing anyway. FWIW, #1 uses an entirely different code path so can't really be used for any sort of validation here. The translation happens in a different place, and the way the device is aggregated is different. At least for the bugchk, the conclusion that it is unrelated to the driver is not supported by the tests. (Note: If you are using the latest Insider build, you may be running with mixed bits which can further complicate things.) |
MIDI-0X uses a 32 bit MIDI library that won't see anything from Windows MIDI Services until we install 32-bit MIDI interface bits in WOW64 |
I have spent the past day trying to determine where this hang is occurring. As far as I can tell from debugger, it is not inside the driver that it is getting locked up - agreed @Psychlist1972 there may be an error case to handle in a subsequent call to driver, but I have been unable to reproduce the crash error in a condition to be diagnosed. First I wanted to see if all data is truly transmitted to and from the UM-One. Using Beagle, I can confirm the full dataset is transmitted to the UM-One and with loopback, all data is read back into the Windows USB stack. Next I looked into the last processed information in the driver into the double buffer. The debug log excerpt below shows that the continuous reader and the driver does process the information and there is room in the double buffer to pass information to higher layers. I still need to determine if the data is subsequently read out of the double buffer. @garydan42 any suggestions on how to check this? `64972: StreamEngine::FillReadStream - StreamEngine::FillReadStream Entry with m_IsRunning set to 1 64978: StreamEngine::FillReadStream - StreamEngine::FillReadStream Entry with m_IsRunning set to 1 64984: StreamEngine::FillReadStream - StreamEngine::FillReadStream Entry with m_IsRunning set to 1 |
It seems PocketMIDI must have added MIDI 2.0 support.I have been trying to reproduce this with my custom MID 2.0 HW as a MIDI legacy loopback (not via MIDI but just an internal USB packet loopback) using midi.exe but could not. , By my experience PocketMIDI crashes in different situations and I am not sure sure if PocketMIDI closes the MIDI 2.0 connection correctly. By my experience the service became in unstable state when not doing it correctly (i.e using trhe tokens). I am going to simulate this again with transmit data provides using my custom MIDI 2 client app and custom device.. |
@Psychlist1972 @AmeNote-Michael |
I have provided detailed logs using the CollectMidiLogs utility to @garydan42. He indicates that he will look at it tomorrow. This is using the USBMidi2.sys Driver. |
Describe the bug
When an MME app is receiving MIDI messages via a MidiSrv enumerated port, it suddenly stops receiving MIDI messages. After that, the MME app hangs when I close the app.
If it occurs, all apps using MidiSrv stop working and restarting OS or terminating MidiSrv process is required to recover.
To Reproduce
All sent messages are looped back and the app starts receiving those messages.
However, messages stop being received halfway and it cannot be closed.
Expected behavior
All sent messages are received and displayed in the MIDI In Monitor.
The app continues working and can be closed.
Installer Name or Version
Windows.MIDI.Services.In-Box.Service.-.1.0.1-preview.7.24305.1438-x64.exe
Desktop (please complete the following information):
Device information, if this is with an external MIDI device:
Application Information
https://www.morson.jp/pocketmidi-webpage/
Additional context
I am not sure if it relates to this issue though, I faced Green Screen once.
I will share the kernel memory dump file separately.
The text was updated successfully, but these errors were encountered: