Skip to content

TUI crashes during prompt edit #3749

Closed
Closed

Description

@tsukinoko-kun

Description

I edited my prompt. I tried Command+backspace wich used to delete a line but nothing happened. Then I continued deleting words with Option+backspace and after I deleted a line the TUI crashed and I saw my shell prompt in the middle of the screen.

OpenCode version

1.0.9

Steps to reproduce

Not sure and not willing to investigate. You guys totally messed up with the recent big change. Nothing works anymore.

Screenshot and/or share link

Image

Operating System

macOS 26.0.1

Terminal

Ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 2, 2025
  2. tsukinoko-kun commented on Nov 2, 2025

    @tsukinoko-kun
    Author

    It's sad seeing this app crumble. It was the best agentic editor for a while.

  3. github-actions commented on Nov 2, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  4. veracioux commented on Nov 2, 2025

    @veracioux
    Contributor

    To the maintainers: I did some experimentation, and while I couldn't replicate the SIGTRAP, I do get a SIGABRT, with this printed:

    /usr/include/c++/13/array:202: reference std::array<unsigned long, 16>::operator[](size_type) [_Tp = unsigned long, _Nm = 16]: Assertion '__n < this->size()' failed.
    

    (maybe more is printed which I'm not able to see because of the already-rendered TUI)

    My specs: Arch Linux, Alacritty

    Reproducing

    1. Paste a long text into the prompt textarea
    2. Hold alt+backspace or regular backspace

    It is kinda unpredictable after how much time it will crash, but I am able to reproduce quite consistently. alt+backspace seems more likely to reproduce it than plain backspace. Also might depend on the keyboard repeat rate - I have mine set to quite high.

    @kommander This seems to be an opentui issue because I reproduced with a minimalistic opentui project:

    https://gist.github.com/veracioux/167b3645c23ccb29620814789ea1565f

    In this project, sometimes it crashes with SIGABRT and an error message as the one above, and sometimes with this one:

    Bun v1.3.1 (89fa0f34) Linux x64                                                                                     │
    Linux Kernel v6.17.1 | glibc v2.42                                                                                  │
    CPU: sse42 popcnt avx avx2 avx512───────────────────────────────────────────────────────────────────────────────────┘
    Args: "bun" "src/index.ts"
    Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) bunfig fetch jsc transpiler_cache tsconfig(2) tsconfig_paths(2) virtual_modules(2)
    Builtins: "bun:ffi" "bun:main" "node:assert" "node:buffer" "node:console" "node:events" "node:fs" "node:fs/promises" "node:module" "node:os" "node:path" "node:stream" "node:tty" "node:url" "node:util"
    Elapsed: 716ms | User: 343ms | Sys: 89ms
    RSS: 1.10GB | Peak: 0.14GB | Commit: 1.10GB | Faults: 1 | Machine: 29.21GB
    
    panic(main thread): Segmentation fault at address 0x7F90872C29A0
    oh no: Bun has crashed. This indicates a bug in Bun, not your code.
    
  5. Regboy744 commented on Nov 2, 2025

    @Regboy744

    Bug Report: Segmentation Fault on Bun v1.3.0

    Description
    Bun crashes with a segmentation fault (address 0x783C21E1E220) immediately upon startup. The crash appears to occur during the initialization phase.
    What happened:

    Bun terminated with "Segmentation fault at address 0x783C21E1E220"
    The process crashed before executing any user code
    No specific error message about what caused the crash

    Image

    Bun version: v1.3.0 (b0a6faca)
    OS: Linux x64 (baseline)
    Kernel: Linux v6.12.56
    glibc: v2.42
    CPU: sse42 popent avx avx2 avx512

    
    ### **When** it happens:
    The crash occurs immediately when running Bun, during the startup/initialization phase.
    
    ### **Error Output**
    

    panic(main thread): Segmentation fault at address 0x783C21E1E220
    oh no: Bun has crashed. This indicates a bug in Bun, not your code.

    
    ### **System Information**
    - **RAM**: 1.016B
    - **Peak Memory**: 0.27GB
    - **Commit**: 1.016B
    - **Faults**: 0
    - **Machine**: 41.756B
    
    ### **How to Reproduce**
    1. Install Bun v1.3.0
    2. Run any Bun command (even `bun --version`)
    3. Observe segmentation fault
    
    ### **Expected Behavior**
    Bun should start normally without crashing.
    
    ### **Actual Behavior**
    Bun crashes with a segmentation fault before executing any code.
    
    ### **Additional Context**
    - The crash report shows multiple Node.js compatibility modules being loaded
    - Error occurs at memory address: `0x783C21E1E220`
    - Elapsed time before crash: 6298ms
    - User: 1436ms | Sys: 301ms
    
    ### **Possible Related Information**
    The crash log shows various Node.js built-in modules being loaded:
    - `node:assert`, `node:async_hooks`, `node:buffer`, `node:child_process`, `node:console`, `node:crypto`, `node:events`, `node:fs`, `node:http`, `node:https`, `node:module`, `node:net`, `node:os`, `node:path`, `node:process`, `node:readline`, `node:stream`, `node:string_decoder`, `node:timers`, `node:timers/promises`, `node:tls`, `node:tty`, `node:url`, `node:util`, `undici`
    
  6. kommander commented on Nov 2, 2025

    @kommander
    Contributor

    @veracioux from opentui the only thing that is c++ would be yoga-layout. Would need to run this with lldb and a debug build of bun and opentui.

  7. self-assigned this
    on Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions