简体   繁体   中英

Deadlock in PortMidi on Windows 10

My code is using PortMidi for several years now.
I use it for writing portable C++ code to control an external MIDI Surface Control of type Mackie .
I use PortMidi latest version: 20101008

Lately we found out that when the control is used exensively on Windows 10 we receive a deadlock. This happens only on Windows 10 .

When in deadlock state the following thread is stuck:

ntdll!ZwWaitForSingleObject
KERNELBASE!WaitForSingleObjectEx
wdmaud!CMIDIOutDevice::WriteEvent
wdmaud!CMIDIOutDevice::PlaySysEx
wdmaud!HwModMessage
wdmaud!dspsL
WINMMBASE!midiMessage
WINMMBASE!midiOutLongMsg
MIDICommunication!winmm_write_flush
MIDICommunication!Pm_WriteSysEx

Using debugger I found that code is waiting for an event (not a lock).

Is anyone aware of PortMidi issues on Windows 10 and/or how to get around it?

Many thanks, Paz

4 months later...
While debugging I found out that this problem exists also if you use Microsoft MIDI API directly.
Due to this I opened a Premier Support Call with Microsoft.
After long time of investigation (four months) Microsoft confirmed that this is a defect in Microsoft WinMM API implementation, which "...does not properly handle PNP removal..." .

I was advised that a fix for this will be issued within RS5 timeframe.


11 months later...
As part of handling my Premier Support Call , Microsoft issued public KB article to describe this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM