-
Notifications
You must be signed in to change notification settings - Fork 0
fix: ffmpeg process leaked on export errors and encoder fallback retries #31
Copy link
Copy link
Open
Labels
area/exportVideo/GIF export pipelineVideo/GIF export pipelinetype:bugSomething brokenSomething broken
Milestone
Description
Description
When an exception occurs during video export after the ffmpeg subprocess is created, the process is never terminated or closed. The finally block only cleans up _merged_audio_path but not proc. Additionally, during encoder fallback retries, a new ffmpeg process is launched without killing the previous one — each retry orphans a zombie process.
Acceptance Criteria
-
proc.kill()+proc.wait()added to the finally block in_run()(around line 1139-1147) - Previous
procis explicitly killed before launching a new one during encoder fallback (around line 1106-1112) -
proc.stdin/proc.stderrare closed on all error paths - No orphaned ffmpeg processes after a failed or cancelled export
Affected Areas
followcursor/app/video_exporter.py(lines 1052-1147, 1082-1112)
Notes
The pipe writer thread (line 823-833) only catches BrokenPipeError | OSError. Other exceptions (e.g. ValueError on a closed pipe) will crash the writer silently, leaving the producer blocked forever. Consider catching Exception in the writer or adding explicit error signaling.
Reactions are currently unavailable
Metadata
Metadata
Labels
area/exportVideo/GIF export pipelineVideo/GIF export pipelinetype:bugSomething brokenSomething broken