Skip to content

Segmentation fault when using <input /> #458

@superhighfives

Description

@superhighfives

First off, opentui is awesome. Thanks for releasing it open source. Came across a bug today that I thought worth sharing. I have an app that stores and runs commands. Here's some screenshots recreating the bug:


Image Image Image

This code example shows a crash I'm getting on macOS Tahoe 26.2. When I run a command which has an input, the app crashes. To recreate, try running greet interactively with bun run src/index.tsx.

The quirk is that it only occurs when the search in the interactive menu is an <input /> (in CommandList.tsx). If I change that to <text /> and add the events manually, it doesn't crash. You can see an example of it working on main:

~/Development/projects/comma main !3 ?5                                                                                                                                                                                                                                                   07:06:02 PM
❯ npm run dev

> [email protected] dev
> bun run --watch src/index.tsx

============================================================
Bun v1.3.4 (5eb2145b) macOS Silicon
macOS v26.2
CPU: fp aes crc32 atomics
Args: "bun" "run" "--watch" "src/index.tsx"
Features: Bun.stdin(2) Bun.stdout(2) debugger fetch jsc transpiler_cache tsconfig 
Builtins: "bun:ffi" "bun:main" "node:buffer" "node:console" "node:events" "node:fs" "node:fs/promises" "node:os" "node:path" "node:stream" "node:url" "node:util" 
Elapsed: 2264ms | User: 156ms | Sys: 38ms
RSS: 104.89MB | Peak: 107.30MB | Commit: 1.07GB | Faults: 72 | Machine: 51.54GB

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

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.3.4/Mr15eb2145gDsgpgC____mrki+Cmrki+Cmrki+Cmrki+C_235h+Cmrki+C____mrki+Cmrki+C235h+Cmrki+C_A2Cgrgo3D

--- Bun is auto-restarting due to crash [time: 1767063967022] ---

You can check it out here:
superhighfives/comma-cli#1

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreThis relates to the core packagereactThis relates to the react package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions