Skip to content

[BUG] Partial mixer inserts from some FL projects can crash snapshot extraction #240

@aernw

Description

@aernw

Objective

Track parser-side compatibility work for FL Studio projects that produce partial mixer inserts and currently rely on StemHub-side defensive fallbacks.

Problem

SuperBeat.zip reproduced a parser compatibility gap during FL snapshot extraction.

load_fl_studio_mixer_snapshot() successfully extracts and parses SuperBeat.flp, but some parsed mixer inserts are missing params in the PyFLP insert model. That causes Insert.__iter__() to raise KeyError: 'params' during slot extraction.

Evidence gathered locally:

  • archive: backend/tests/fixtures/parser_corpus/assets/stemhub_snapshots/SuperBeat.zip
  • extracted FLP: SuperBeat.flp
  • failing inserts: mixer insert ids 61 and 62
  • parser warning observed during parse: VSTPluginEvent: Unknown marker 12 detected; continuing parse with best-effort fallbacks.
  • parser stack failure before StemHub hardening:
    • backend/vendor/PyFLP_v2/pyflp/mixer.py:413
    • yield Slot(ed, params=self._kw["params"].slots[idx])
    • KeyError: 'params'

StemHub was hardened to tolerate this shape and continue building a snapshot, but the underlying issue is still parser/model incompleteness for this FLP.

Why This Matters In M2

M2 is FL-core and storage/diff heavy. We need parser behavior that is resilient enough for real user projects, especially when snapshot extraction feeds compare/history flows. A parser that yields partial mixer inserts without a stable compatibility contract will keep surfacing as flaky diff coverage or silent semantic loss.

Scope

  • investigate why this FLP yields inserts without params
  • determine whether the unknown VST marker path is the direct cause
  • define parser behavior for partial mixer inserts:
    • either populate safe/default insert params
    • or expose a documented partial/unsupported state without crashing downstream iteration
  • add an upstream-compatible regression fixture or reproduction path for this project shape

Out Of Scope

  • redesigning StemHub diff semantics beyond necessary parser compatibility handling
  • broad plugin compatibility work unrelated to this failure pattern

Acceptance Criteria

  • SuperBeat.flp no longer produces crashing mixer inserts during slot iteration
  • parser behavior for inserts missing parameter payloads is explicit and test-covered
  • StemHub no longer needs to rely on this exact defensive fallback to keep snapshot extraction alive for this project shape

Current StemHub Status

  • StemHub corpus now includes SuperBeat.zip as a regression fixture
  • StemHub snapshot extraction no longer crashes on this archive
  • StemHub still receives the parser warning and best-effort partial mixer data

Suggested Labels / Priority

Parser compatibility bug affecting FL snapshot extraction and downstream diff reliability.

Metadata

Metadata

Assignees

Labels

backendBackend and API workbugSomething isn't workingp2-mediumStandard workparserDAW parser and binary analysis work

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions