Skip to content

Bridge sysex 254 limit - #2074

Open
luginf wants to merge 2 commits into
falkTX:mainfrom
luginf:bridge-sysex-254-limit
Open

luginf wants to merge 2 commits into
falkTX:mainfrom
luginf:bridge-sysex-254-limit

Conversation

@luginf

@luginf luginf commented Jul 28, 2026

Copy link
Copy Markdown

fix the case discussed there: #2071 (comment)

luginf added 2 commits July 28, 2026 18:46
EngineMidiEvent::size was uint8_t, and the JACK input paths (both
the per-port event class and the Rack/Patchbay ingestion code)
asserted size < 0xFF before truncating-casting to uint8_t, silently
dropping any incoming SysEx bigger than 254 bytes (e.g. a full
patch/timbre bulk dump, as opposed to short parameter-sized SysEx
which already worked).

Widened EngineMidiEvent::size and fillFromMidiData's size parameter
to uint16_t, and fixed both occurrences of the assert+cast in
CarlaEngineJack.cpp accordingly.

Scoped to direct/in-process JACK hosting (Rack, Patchbay, Multiple
Clients); out-of-process bridged plugins still serialize MIDI event
size as a single byte over IPC and would need separate follow-up work
…ges (previously only fixed for direct/in-process hosting).

Two paths were affected, with different severity:

- JACK-app bridge (wrapping external JACK apps): moderate fix - just needed the same size-field widening as before (single byte → wider), since the underlying buffer was already well-designed.
- Native/VST/LV2 out-of-process bridge: deeper issue - the code had a // FIXME variable-size stack comment left by the upstream maintainers themselves. It used a tiny 4-byte stack buffer and flatly rejected anything larger. Replaced with a proper per-cycle buffer pool (same pattern already used successfully on the JACK-app side), so large SysEx no longer gets dropped there either.

Also widened the shared wire protocol between Carla and its bridge processes (the size field was a single byte, capping messages at 255 bytes regardless of engine-side fixes), and bumped the bridge protocol version number to reflect the change.

Deliberately out of scope: the output direction (plugin → host) still has the same single-byte limit on both bridges - untouched, since that's not what was reported.

This branch (bridge-sysex-254-limit) is stacked on jack-midi-254-limit rather than independent, since it genuinely depends on that fix's core widening to do anything at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant