Skip to content

Bug: App aborts (SIGABRT) when switching back with Cmd+Tab right after typing in an input #355

Open

Description

@nelu-dragan

What happened:
Termic crashes (SIGABRT, "Abort trap: 6") about 3-4 times a day. It always happens
the same way: I type something into the Claude input (sometimes after pasting a
screenshot), Cmd+Tab to another app, then quickly Cmd+Tab back to Termic — and
the app dies instantly.

All 14 crash reports I have since 2026-09-24 share the exact same stack: a Rust
panic inside tao's NSApplication sendEvent override, which cannot unwind across
the Objective-C boundary, so std aborts the process:

core::panicking::panic_cannot_unwind
core::panicking::panic_nounwind
std::panicking::panic_handler
std::process::abort
tao::platform_impl::platform::app::send_event <-- panics here
-[NSApplication _handleEvent:]
-[NSApplication run]
tao::platform_impl::platform::event_loop::EventLoop::run
tauri_runtime_wry::Wry::run
tauri::app::App::run
termic_lib::run

So something in the event path (most likely the keyboard/IME or focus state
being restored on app re-activation) panics, and since it happens inside an
extern "C" callback the whole app is aborted instead of the error being handled.

Steps to reproduce:

  1. Open Termic and focus the Claude input.
  2. Type some text (pasting a screenshot makes it more likely).
  3. Press Cmd+Tab to switch to another app.
  4. Immediately press Cmd+Tab again to come back to Termic.
  5. Termic crashes (not on every attempt, but roughly 3-4 times a day in normal use).

Termic version:
1.11.0 (1.11.0) — com.simion.termic
macOS 27.0 (26A428), MacBook Pro (Mac15,7, Apple silicon)

Activity

  1. simion commented on Oct 6, 2026

    @simion
    Owner

    I can't reproduce this, so I need one more piece from a crash report.

    The stack you posted ends in tao's sendEvent: override, and nothing in that function panics by itself.
    What it looks like is an Objective-C exception thrown further down, in AppKit or WebKit, while the event is handled.
    A plain Cocoa app logs that and carries on.
    Here it has to cross a Rust extern "C" frame on the way out, and Rust aborts the process instead.

    That makes the frames you have the place it died, not the place it went wrong.
    The crash report records the second one separately.

    Could you paste, from one of the .ips files:

    • the Last Exception Backtrace section, if there is one
    • the Application Specific Information lines near the top (the exception name and reason)

    They are in ~/Library/Logs/DiagnosticReports/, or Console.app under Crash Reports.
    If there is no Last Exception Backtrace at all, say so, because that rules this theory out.

    Two things that would also help:

    • whether it still happens on 1.13.3 (you reported it on 1.11.0)
    • whether an input method other than plain US/ABC is active when it happens
  2. nelu-dragan commented on Oct 11, 2026

    @nelu-dragan
    Author

    Thanks for looking into it. I've attached all 8 crash reports I still have (termic-crash-reports-2026-10.zip, 2026-10-02 → 2026-10-09; older ones were already rotated out by macOS).

    Last Exception Backtrace: there is none, in any of the 8 reports. Application Specific Information only contains libsystem_c.dylib: abort() called, so it looks like your Objective-C exception theory is ruled out.

    Still happens on newer versions: yes. 6 of the 8 crashes are on 1.13.4 (macOS 27.0.1, 26A434), with the same stack as before:

    core::panicking::panic_cannot_unwind
    tao::platform_impl::platform::app::send_event
    -[NSApplication _handleEvent:]
    -[NSApplication run]
    tao ... EventLoop::run → tauri_runtime_wry::Wry::run → tauri::App::run → termic_lib::run
    

    (The other two are on 1.11.0 and 1.12.2.) Two of them happened one second apart (2026-10-09 15:55:04 and 15:55:05).

    Input methods: only plain U.S. in practice, with no IME. Romanian and Russian layouts are enabled in System Settings, but I don't switch to them, so the crashes happen with U.S. active.

    One different crash you may want to look at separately: termic-2026-10-07-172928.ips (1.13.4) panicked in a different place, a print to stderr from your log helper, triggered by a webview IPC message:

    std::io::stdio::_eprint
    termic_lib::dlog
    termic_lib::run::{closure}
    tauri::webview::Webview::on_message
    tauri::ipc::protocol::get
    

    eprint! panics when writing to stderr fails (e.g. stderr closed when the app isn't launched from a terminal), so dlog might be better off ignoring the write error (let _ = writeln!(io::stderr(), ...)).

    termic-crash-reports-2026-10.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions