Problem
Pressing Cmd+V crashes the app with a segfault:
EXC_BAD_ACCESS / Segmentation fault: 11
libobjc.A.dylib: objc_msgSend
AppKit: -[NSPasteboard _updateTypeCacheIfNeeded]
WebKit: WebPasteboardProxy::grantAccessToCurrentData
WebKit: -[WKWebView(WKImplementationMac) paste:]
Root Cause
The app has no native macOS Edit menu. Without it, Cmd+V bypasses the menu system and goes directly through a lower-level AppKit path into WKWebView's paste handler. This races with the clipboard plugin's readImage() call (used for image paste detection), causing a stale pointer dereference in NSPasteboard.
This is a known Tauri/macOS issue (tauri-apps/tauri#2397, tauri-apps/tauri#3395).
Fix
Add a native Edit menu with standard items (Cut, Copy, Paste, Select All) in src-tauri/src/lib.rs:
use tauri::menu::{MenuBuilder, SubmenuBuilder};
let edit_menu = SubmenuBuilder::new(app, "Edit")
.cut()
.copy()
.paste()
.select_all()
.build()?;
let menu = MenuBuilder::new(app)
.item(&edit_menu)
.build()?;
app.set_menu(menu)?;
This routes Cmd+V through the macOS menu system, which synchronizes NSPasteboard access on the main thread before dispatching to WKWebView. The DOM paste event still fires normally, so existing JS paste handlers (terminal image paste, notes editor) continue to work.
Also fix
log_frontend_error in commands.rs:2098 uses bare eprintln! which panics when stderr is unavailable (orphaned process). Change to let _ = write!() to silently discard errors. (Already implemented on current master, needs commit.)
Problem
Pressing Cmd+V crashes the app with a segfault:
Root Cause
The app has no native macOS Edit menu. Without it, Cmd+V bypasses the menu system and goes directly through a lower-level AppKit path into WKWebView's paste handler. This races with the clipboard plugin's
readImage()call (used for image paste detection), causing a stale pointer dereference in NSPasteboard.This is a known Tauri/macOS issue (tauri-apps/tauri#2397, tauri-apps/tauri#3395).
Fix
Add a native Edit menu with standard items (Cut, Copy, Paste, Select All) in
src-tauri/src/lib.rs:This routes Cmd+V through the macOS menu system, which synchronizes NSPasteboard access on the main thread before dispatching to WKWebView. The DOM
pasteevent still fires normally, so existing JS paste handlers (terminal image paste, notes editor) continue to work.Also fix
log_frontend_errorincommands.rs:2098uses bareeprintln!which panics when stderr is unavailable (orphaned process). Change tolet _ = write!()to silently discard errors. (Already implemented on current master, needs commit.)