Skip to content

OpenCut v1.9.16

Choose a tag to compare

@SysAdminDoc SysAdminDoc released this 04 Apr 20:42
· 124 commits to main since this release

Performance Audit & Memory Leak Fixes

Critical Fixes

  • /video/auto-zoom broken return — route returned {} instead of result_dict, discarding keyframes and output path entirely
  • Unbounded thread spawning_persist_job() and _schedule_record_time() spawned raw threading.Thread per call; replaced with bounded ThreadPoolExecutor(2) to prevent 200+ thread leak under batch load
  • Rate limit slot leakmake_install_route() permanently lost rate_limit slot when rate_limit() returned False, eventually blocking all model installs until server restart

Memory & GPU Fixes

  • GPU memory leak in audio_enhance — CUDA tensors not fully released between calls; now moves tensors to CPU, deletes all refs, then clears cache
  • Color match frame buffer waste — BGR frames kept alongside YCbCr copies (~124MB at 1080p); freed immediately after conversion
  • SQLite connection leak — thread-local connections in job_store.py never closed on shutdown; added connection tracking and close_all_connections()

Thread Safety & Stability

  • Timer thread spam — temp file cleanup spawned new threading.Timer per retry (300+ threads on Windows batch cleanup); replaced with single background worker thread
  • Haar cascade race conditionauto_zoom._get_cascade() wrote global singleton from multiple threads without locking; added double-checked locking
  • CEP health timer leaksetInterval reassigned without clearInterval on failure, accumulating parallel health check intervals

Code Quality (Prior Session Merge)

  • subprocess.run(check=False) added across all bare subprocess calls
  • Exception chaining (raise ... from err) for proper tracebacks
  • contextlib.suppress replacing bare try/except: pass patterns
  • Import ordering cleanup (make_install_route hoisted to top-level imports)
  • FFmpeg dependency check robustness (returncode + version validation)
  • audio_suite.measure_loudness() now raises on ffmpeg failure
  • Clip-notes example plugin upgraded to SQLite storage with legacy JSON compat
  • CEP panel: workspace state persistence, theme/style overhaul
  • New tests for loudness failure and ffmpeg dependency edge cases