Re: More MIDI sysex problems
Re: More MIDI sysex problems
- Subject: Re: More MIDI sysex problems
- From: Kurt Revis <email@hidden>
- Date: Sat, 5 Jan 2002 04:14:08 -0800
By the way, here's another bug (or undocumented limitation, take your
pick):
When using MIDISend(), if your packet list has one packet, and the
packet list is greater than 1054 bytes in size, you will crash or hang
the MIDIServer process, and any further calls to CoreMIDI functions will
hang your app (and any others using CoreMIDI). MIDISend() won't return
an error. Using more packets doesn't make a big difference (I tried
with 50 packets in a packet list, and didn't crash until I got to 1059
bytes of total packet list size).
I'm guessing that there's an internal 1024-byte buffer that's getting
overrun. When MIDIServer crashes, the backtrace in the crashed thread
looks pretty messed up (more so depending if your packet list is longer).
The obvious workaround is to split up sends into more packet lists, or
use MIDISendSysex(). Inconvenient, but that's how it goes.
I just submitted this as bug #2836647. Hopefully this info will save
somebody else some time.
--
Kurt Revis
email@hidden