https://bugs.winehq.org/show_bug.cgi?id=46170
Bug ID: 46170 Summary: Programs that get MIDI data from the "Midi Through" port will crash Product: Wine Version: 3.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: realnc@gmail.com Distribution: ---
Created attachment 62822 --> https://bugs.winehq.org/attachment.cgi?id=62822 Example MIDI file that reproduces the crash.
Any Windows software that is configured to use the ALSA "Midi Through" port for MIDI input (as provided by the snd-seq-dummy kernel module) will crash with a page fault exception dialog. This only happens with certain MIDI data. It seems to depend on the speed of the MIDI data.
The issue was originally discovered by using the Linux version of ScummVM together with the Windows program "Falcosoft Midiplayer" as a means of using a Windows-only VSTi as a software MIDI synth for ScummVM. In such a setup, the Linux program is configured to use the "Midi Through" port as MIDI-out, and the Windows program is configured to use it as MIDI-in.
However, after capturing the specific MIDI data that triggers the crash into a *.mid file, playing that file in any MIDI player that uses "Midi Through" for MIDI-out and *any* Windows MIDI program that uses "Midi Through" as MIDI-in, will crash the Windows program.
The problem is reproducible by at least two people on two different machines. It is reproducible by building current Wine Git master, without any third-party patches, and on a cleared ~/.wine directory. Example steps to reproduce this are:
1. Make sure the "Midi Through" port is available. aplaymidi -l should list something like:
$ aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0
"Midi Through" is port 14:0 here. If no such port exists, load the "snd-seq-dummy" kernel module:
$ modprobe snd-seq-dummy
2. Download the attached "crash.mid" file.
3. Download the Falcosoft Midiplayer from:
http://falcosoft.hu/softwares.html#midiplayer
4. Run MidiPlayer.exe in Wine and click the gear icon to open the settings. Check the "Use Bass (Soundfonts/VSTi)" checkbox (this is only necessary in order to avoid an unrelated Wine crash.) In the "Midi In" group, check the "Active" checkbox. In the "Input Port" drop-down selection list, select "Midi Through Port-0". Click OK.
5. Play the "crash.mid" file using a Linux MIDI player, like aplaymidi, telling it to use the Midi Through port as output:
$ aplaymidi -p 14 crash.mid
Substitute "14" with the actual port if it differs on your system. It might take a few attempts before the crash occurs. Here, it crashes about 80% of the time.
The above steps are just an example. The crash is reproducible with any other Windows MIDI client, not just the Falcosoft one. See:
https://www.vogons.org/viewtopic.php?f=24&t=48207&start=760#p714667