Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: macOS 26 Tahoe crash — enable objc2 relax-sign-encoding + enhanced panic logging

Louis Beaumont2966ac688f17
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 466882df5..48c34fca1 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9078,6 +9078,7 @@ dependencies = [
"nokhwa-bindings-macos",
"notify",
"objc",
+ "objc2 0.6.3",
"once_cell",
"raw-window-handle",
"regex",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index d0640b176..fc6e70778 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -130,6 +130,11 @@ cocoa = "0.26.0"
objc = "0.2.7"
block = "0.1"
base64 = "0.22.1"
+# Fix macOS 26 Tahoe crash: ObjC method signatures changed from signed to unsigned
+# integers, causing objc2 strict validation to panic inside tao's extern "C" callbacks
+# (send_event, did_finish_launching) → panic_cannot_unwind → SIGABRT
+# See: https://github.com/tauri-apps/tao/issues/1171
+objc2 = { version = "0.6", features = ["relax-sign-encoding"] }
# bunch of hack for permissions
core-graphics-helmer-fork = "0.24.0"
nokhwa-bindings-macos = { git = "https://github.com/CapSoftware/nokhwa", rev = "0d3d1f30a78b" }
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 5be657ac7..4831fc03d 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -973,8 +973,31 @@ async fn main() {
"unknown panic payload".to_string()
};
let location = info.location().map(|l| format!("{}:{}:{}", l.file(), l.line(), l.column())).unwrap_or_default();
+
+ // Force-capture a backtrace before abort() kills us
+ let backtrace = std::backtrace::Backtrace::force_capture();
+
+ let crash_msg = format!(
+ "PANIC on thread '{}' at {}: {}\n\nBacktrace:\n{}",
+ thread_name, location, payload, backtrace
+ );
+
// Log to stderr (survives even if tracing isn't initialized yet)
- eprintln!("PANIC on thread '{}' at {}: {}", thread_name, location, payload);
+ eprintln!("{}", crash_msg);
+
+ // Write to a crash log file — this survives abort() since we fsync
+ // Critical for diagnosing panics inside tao's extern "C" callbacks
+ // (send_event, did_finish_launching) where panic_cannot_unwind → abort()
+ if let Some(log_dir) = dirs::home_dir().map(|d| d.join(".screenpipe")) {
+ let crash_path = log_dir.join("last-panic.log");
+ if let Ok(mut f) = std::fs::File::create(&crash_path) {
+ use std::io::Write;
+ let timestamp = chrono::Local::now().format("%Y-%m-%d %H:%M:%S%.3f");
+ let _ = writeln!(f, "[{}] {}", timestamp, crash_msg);
+ let _ = f.sync_all(); // fsync before abort() kills us
+ }
+ }
+
// Also report to Sentry if initialized
sentry::capture_message(
&format!("panic on thread '{}' at {}: {}", thread_name, location, payload),