[macOS 26.3] Export panics on NULL +[NSSavePanel savePanel] before rendering — editor freezes, GUI export impossible (0.5.9)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
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
- Record anything in Studio mode (happens with an 18-min window recording, but length seems irrelevant)
- Click Export in the editor
- App freezes;
panics.logshows 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 --strictpasses. - 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:
- Don't let a nil panel take down the app.
rfdunconditionally 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/Noneinstead would turn a hang into a handled case. - Fall back to a default save location when the dialog can't be shown (e.g.
~/Desktopor 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CapSoftware/Cap
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CapSoftware/Cap#2305 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CapSoftware/Cap#1714 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
CapSoftware/Cap#2340 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
CapSoftware/Cap#2339 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
CapSoftware/Cap#2329 · 2 commenti ·
Tutte le issue di CapSoftware/Cap
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·