I wonder, stephane, how have you found Reaper's stability while injecting program change MIDI events? I generally have Reaper hang on me multiple times a day, as one of its threads goes into a busy loop.
I haven't reported this yet because I've not been able to find a reliable recipe to reproduce (and I've noticed that nontrivial bugs generally don't get fixed, let alone inconsistent nontrivial bugs).
Stack trace shows the problem is in reaper_midi.dll. I'm wondering if you've experienced this kind of instability yourself? If it's not just me, I might submit a bug report anyway. Maybe it'll even get fixed within the decade.
I think the problem is with either reaper.MIDI_InsertEvt() or reaper.StufMIDIMessage(), but I can't be sure.
Code:
ntdll.dll!memcpy+0x305
ntdll.dll!RtlReAllocateHeap+0xb5d
ntdll.dll!RtlReAllocateHeap+0x12f
ntdll.dll!RtlReAllocateHeap+0x31
reaper_midi.dll!ReaperPluginEntry+0x9bfef
reaper_midi.dll+0x8929b
reaper_midi.dll+0xdda48
reaper.exe+0x4638dc
reaper.exe+0x465ddb
reaper.exe+0x465cd9
reaper.exe+0x3eb43
reaper.exe+0x52575
reaper.exe+0x3ef14
reaper.exe+0x35b72
reaper.exe+0x3e4c4
reaper.exe+0x3dfdf
reaper.exe+0x35aa7
reaper.exe+0x565b88
reaper.exe+0x534c6d
reaper.exe+0x16e0c4
reaper.exe+0x16cb08
reaper.exe+0x33b84a
USER32.dll!IsChild+0x2e2
USER32.dll!CallMsgFilterW+0x1c6
USER32.dll!UnpackDDElParam+0x789
USER32.dll!CallWindowProcW+0x4f4
USER32.dll!DispatchMessageW+0x1bc
reaper.exe+0x335d3e
reaper.exe+0x728e21
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21