opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Crashes on Windows

Open klonuo opened this issue 1 month ago • 11 comments

Description

Latest version crashes on any input:

Bun v1.3.3 (274e01c7) Windows x64 (baseline)
Windows v.win11_dt
Plan
OpenCode Zen Grok Code Fast 1
CPU: sse42 avx avx2
Args: "C:\Users\klo\scoop\apps\opencode\current\opencode.exe" "--user-agent=opencode/1.0.114" "--" ctrl+p commands
Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) fetch(19) http_server jsc shell(4) spawn(9) standalone_executable workers_spawned
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node-fetch"
Elapsed: 9345ms | User: 2890ms | Sys: 1250ms
RSS: 0.49GB | Peak: 0.51GB | Commit: 0.66GB | Faults: 141385 | Machine: 17.06GB
panic(main thread): Segmentation fault at address 0x3
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:kets
https://bun.report/1.3.3/ea1274e01ciIz/33+/BC8B.9b7baed737f7577f-00000000.dllytiZ_iv8toB__qju/vCA2AG

In WSL it works fine

OpenCode version

1.0.114

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

klonuo avatar Nov 26 '25 20:11 klonuo

oof bun bug

rekram1-node avatar Nov 26 '25 20:11 rekram1-node

we will send to the bun team

rekram1-node avatar Nov 26 '25 20:11 rekram1-node

What are the temporary solutions?


Windows v.win11_ge▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
CPU: sse42 avx avx2      tab switch agent  ctrl+p commands
Args: "C:\Users\xdx\scoop\apps\opencode\current\opencode.exe" "--user-agent=opencode/1.0.119" "--"    • 0 LSP  /status
Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) fetch(29) http_server jsc shell(2) spawn(4) standalone_executable workers_spawned(2) workers_terminated
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node-fetch"
Elapsed: 14189ms | User: 1515ms | Sys: 234ms
RSS: 0.67GB | Peak: 0.69GB | Commit: 0.84GB | Faults: 190616 | Machine: 68.54GB

panic(main thread): Segmentation fault at address 0x3
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.3/ea1274e01ciYz+33+/BC8B.9b7cbaef7ff257b7-00000000.dllytiZ_iv8toB__qju/vCA2AG

PS C:\Users\xdx>

cheezmil avatar Nov 28 '25 16:11 cheezmil

@cheestard can you provide any reproduction steps for the error? And then we can send to bun team

rekram1-node avatar Nov 28 '25 17:11 rekram1-node

I've already submitted an issue to the Bun team. I found that Opencode uses an enormous amount of Bun-specific features—there's no way around it; only the Bun team can fix this...

cheezmil avatar Nov 28 '25 21:11 cheezmil

@rekram1-node https://github.com/oven-sh/bun/issues/25186 They’ve made the fix; plz tell me when opencode-ai is updated~

cheezmil avatar Nov 29 '25 20:11 cheezmil

Yeah we need to wait till the next bun release comes out. They said they'd prioritize fixes for us so hopefully next version will be released soon, we can bump to it and then we will be more stable as a result

rekram1-node avatar Nov 29 '25 20:11 rekram1-node

Seeing something similar in PowerShell too ... was running fine for some time ... then suddenly kept crashing in a project where I am producing CSVs w. python ...

Typing manually ... I can't seem to copy paste after the crash:

Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) ferch(22) http_server jsc shell(4) spawn(4) standalone_executable workers_spawned(2)

Builtins: "bun:ffi" "bun:main" "node:assert ....

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

checking: bun --version #I don't see anything ... so ... not sure how opencode calls on bun here.

johnem-msft avatar Dec 07 '25 18:12 johnem-msft

opencode ships a single file bun executable, so you don't need bun installed the executable contains it

rekram1-node avatar Dec 07 '25 18:12 rekram1-node

is the bun new release with the patch out? im having the same issue

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

is there no way to bypass it until it gets fixed? downgrading or something like that. I was eager to switch from CC but I cant really use opencode like this lol

Microck avatar Dec 13 '25 17:12 Microck

Ill update bun and ship

rekram1-node avatar Dec 13 '25 18:12 rekram1-node

I shipped the bun upgrade in latest release btw

rekram1-node avatar Dec 15 '25 04:12 rekram1-node