SpliceKit icon indicating copy to clipboard operation
SpliceKit copied to clipboard

Crash: captions.generate paste → FFNotificationCenter recursion → EXC_BAD_ACCESS in FFSynchronizable::Lock (3.3.9)

Open starpixels opened this issue 3 weeks ago • 0 comments

Related to #80 (generate_captions crashes) — different stack and trigger, adding evidence.

Summary

captions.generate (social caption titles) crashed Final Cut Pro during the paste phase: EXC_BAD_ACCESS in FFSynchronizable::Lock() after a re-entrant FFNotificationCenter notification storm triggered by FFSourceVideoEffect inputChangedNotification:.

Crash report

Final Cut Pro-2026-11-14-174550.ips, SpliceKit 3.3.9:

Exception: EXC_BAD_ACCESS (SIGSEGV), KERN_INVALID_ADDRESS at 0x70
Thread 0 (com.apple.main-thread):
  FFSynchronizable::Lock()
  -[FFSourceVideoEffect _invalidateCachedMD5:]
  -[FFSourceVideoEffect inputChangedNotification:]
  Observers::Notify(...)
  +[FFNotificationCenter postNotificationName:object:userInfo:]
  -[FFSourceVideoEffect inputChangedNotification:]        (re-enters)
  ... (notification recursion repeats many frames)
  -[FFAnchoredObjectSegmentedVideoSource rangeInvalidated:]
  -[FFAnchoredCollection _sendDeferredUpdate:sendDuration:doesntChangeGrid:]

Context / related automation hazard

The caption pipeline builds a temp FCPXML project, imports it, copies, and pastes onto the user's timeline. Two problems compounded:

  1. Pasting the temp project's titles into the user's library triggered FCP's modal "You are editing clips between libraries... Media will be copied" alert. The pipeline blocked on the modal (status stayed generating) until something dismissed it; headless/MCP clients have to poll detect_dialog and click OK manually.
  2. After dismissal, the paste crashed FCP with the stack above — no titles landed.

Suggest: (a) build the temp project in the same library as the target sequence to avoid the cross-library modal, or pre-answer/suppress it; (b) if the crash is reproducible, the notification recursion in FFSourceVideoEffect during batch title paste needs a re-entrancy guard.

starpixels avatar Nov 14 '26 23:11 starpixels