Skip to content

feat: make Sim Cam production ready#17

Merged
annurdien merged 10 commits into
mainfrom
feature/experiment
Jul 22, 2026
Merged

feat: make Sim Cam production ready#17
annurdien merged 10 commits into
mainfrom
feature/experiment

Conversation

@annurdien

Copy link
Copy Markdown
Owner

What was changed

1. Build Pipeline Fixes

  • Added a step to explicitly delete cross-compiled binaries from the wrong runner so Linux-built artifacts don't overwrite macOS binaries.

2. CI/CD Linting Exclusions

  • Added selective exclusions for cmd/cam*.go to suppress hyper-strict formatting and stylistic linters.

3. Camera Host Management Bug Fixes

  • Fixed a zombie process leak if the camera host times out during startup.
  • Fixed TUI State Fix (SA4005) so the UI opens with the active simulator pre-selected.
  • Fixed sim cam stop to properly clean up global temporary .status and .pid files.

annurdien added 10 commits July 22, 2026 17:01
- Fix seqlock pattern to canonical seq+1/seq+2
- Fix CMSampleBuffer use-after-free
- Add zero-copy frame delivery path
- Daemonize FrameHost to survive terminal close
- Remove duplicate SharedFrameReader leaks
- Fix unchecked entitlement errors
- Update offset comments and gitignore
Apps using PermissionManager-style patterns configure the camera session
but never call startRunning(), leaving AVCaptureVideoPreviewLayer in a
dormant state and producing a frozen black frame.

Changes in CaptureHooks.mm:
- Add gAVSessionStarted flag (set in msc_startRunning) to track whether
  the app explicitly called startRunning so we don't double-start
- Add MSCFakeCaptureDevice.deviceType returning builtInWideAngleCamera
  so discovery-session filters (e.g. bestPossibleBackCamera) match via
  the preferred-type loop rather than the last-resort fallback
- In msc_setSession:, init_mscWithSession:, and
  initWithSessionWithNoConnection:, dispatch a 500 ms delayed block that
  calls startRunning if the app never did — the delay ensures onAppear
  and any explicit startRunning the app calls have already fired,
  preventing a double-start crash on Simulator; wrapped in @try/@catch
  as an additional safety net
Copilot AI review requested due to automatic review settings July 22, 2026 10:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@annurdien
annurdien merged commit 66e6f15 into main Jul 22, 2026
2 checks passed
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.

2 participants