Skip to content

[Bug]: App crashes on Cmd+W session close with EXC_BAD_ACCESS in terminal scrollbar render path #246

@forketyfork

Description

@forketyfork

Description

Closing a terminal session with Cmd+W can crash Architect. The crash happens on the main thread during overlay rendering (terminal.PageList.scrollbar called from render.renderer.renderSessionOverlays) immediately after session close flow, instead of cleanly closing the focused session.

Steps to Reproduce

Starting state: Architect is running with at least one active terminal session (v0.53.2).

  1. Focus an active terminal session.
  2. Press Cmd+W to close that session.
  3. Observe app behavior during/after close transition.

Reproducibility: Intermittent

Expected Behavior

The focused terminal session closes cleanly (or relaunches according to current single-session behavior) and the app remains stable.

Actual Behavior

The app crashes with EXC_BAD_ACCESS (SIGSEGV) on the main thread.
From crash report: terminal.PageList.scrollbar -> render.renderer.renderSessionOverlays -> app.runtime.run.

Suspected Area

Session lifecycle/teardown and render synchronization around close/compaction:
src/app/runtime.zig, src/session/state.zig, src/render/renderer.zig (overlay scrollbar path).

Acceptance Criteria

  • If feasible: a regression test exists that reproduces this crash scenario (fails before fix, passes after)
  • Closing sessions via Cmd+W no longer crashes (including repeated close operations)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajorHigh-priority issues with significant user impact

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions