Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[macOS 26.3] Export panics on NULL +[NSSavePanel savePanel] before rendering — editor freezes, GUI export impossible (0.5.9)

Aperta
#2,163 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
macos, rust
Ambito
desktop

Direzione di ricerca

Inizia da export_video_to_file_inner e segui il percorso di salvataggio della GUI attraverso AsyncFileDialog::save_file di rfd, usando il panic segnalato di NSSavePanel come caso di errore. Il lavoro è completato quando un pannello di salvataggio NULL non blocca più né provoca panic nell’editor e l’esportazione adotta il comportamento di fallback per la posizione di salvataggio proposto; cap-cli export fornisce un percorso di confronto funzionante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Clicking Export in the Studio editor immediately panics the main thread and freezes the entire app. The panic is:

[2026-08-29T15:54:28.580760+00:00] pid=96459 thread='main' at objc2-app-kit-0.3.1/src/generated/NSSavePanel.rs:103:5: unexpected NULL returned from +[NSSavePanel savePanel]
   7: objc2::__macro_helpers::retain_semantics::none_fail
   8: rfd::backend::macos::file_dialog::panel_ffi::Panel::build_save_file
   9: rfd::backend::macos::modal_future::ModalFuture<R,D>::new::{{closure}}
  10: rfd::file_dialog::AsyncFileDialog::save_file
  12: tauri_runtime_wry::handle_user_message

100% reproducible on this machine (3/3 attempts across 2 app restarts, incl. a fresh process). Because export_video_to_file_inner shows the save dialog before rendering, export is completely impossible from the GUI — the app must be force-killed each time.

Reproduction
  1. Record anything in Studio mode (happens with an 18-min window recording, but length seems irrelevant)
  2. Click Export in the editor
  3. App freezes; panics.log shows the NSSavePanel NULL panic
Environment
  • Cap 0.5.9 (Homebrew cask, bundle untouched since install — mtime matches release build)
  • macOS 26.3 (Tahoe, Darwin 25.3.0), MacBook Air M4, arm64
Diagnostics already done
  • Recording itself is flawless — all segments close cleanly, data intact.
  • This is not the post-auto-update signature mismatch from tauri-apps/tauri#13047: the bundle on disk was never modified after launch, and codesign -v --deep --strict passes.
  • The binary is single-arch arm64 (not universal) and already carries com.apple.security.cs.allow-jit + allow-unsigned-executable-memory, i.e. the workarounds discussed in the tauri issue don't apply/help.
  • macOS's panel XPC service (com.apple.appkit.xpc.openAndSavePanelService) is healthy on the machine — QuickTime Player used it successfully minutes after Cap's panic (verified in unified log). At Cap's panic moment the service is never even spawned for Cap's process: AppKit returns nil from +[NSSavePanel savePanel] before any XPC activity.
  • Unified log shows no ViewBridge/sandbox/codesign denials for Cap at panic time.
Workaround

cap-cli export (bundled in Cap.app/Contents/MacOS) renders the same project headlessly without issue — the bug is purely the GUI save-panel path.

Suggested fix

Two layers:

  1. Don't let a nil panel take down the app. rfd unconditionally unwraps +[NSSavePanel savePanel]; anything that makes AppKit return nil (this bug, tauri#13047's update case, remote sessions on Tahoe per reports there) becomes a main-thread panic and a frozen editor. Wrapping the dialog request so failure surfaces as an error/None instead would turn a hang into a handled case.
  2. Fall back to a default save location when the dialog can't be shown (e.g. ~/Desktop or the custom path requested in #1857), so export still works even when AppKit misbehaves. Since the render happens after path selection anyway, falling back costs nothing.

Happy to test patches — the repro is deterministic on this machine.

Lingua principale
Rust
Stelle
22.5k
Fork
1.9k
Merge medio
7h 43m
PR unite (30g)
80

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CapSoftware/Cap

Tutte le issue di CapSoftware/Cap

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.