You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{join}from"node:path";constserver=Bun.serve({port: 0,fetch(request){leturl=newURL(request.url).pathname;if(url.length===0){url="index.html";}constfilePath=join(import.meta.dir,"dist",url);constfile=Bun.file(filePath);returnnewResponse(file);},error(){returnnewResponse(null,{status: 404});},});console.log(`Serving at port ${server.port} url ${server.url.href}`);
which runs a more lengthy build script that places resulting files in dist directory.
Crash occurred when adding a new file to the source directory, having it built, and placed in the dist directory.
Relevant log output
MyProject\_Docs on master [!?] via 🍞 v1.1.12 via v21.6.2
❯ bun run serve
$ bun serve.mts
Serving at port 9137 url http://localhost:9137/
============================================================
Bun v1.1.12 (43f0913c) Windows x64
Args: "C:\Users\Atulin\.bun\bin\bun.exe""serve.mts"
Features: jsc abort_signal http_server tsconfig
Builtins: "bun:main""node:path"
Elapsed: 22992ms | User: 78ms | Sys: 93ms
RSS: 117.37MB | Peak: 117.46MB | Commit: 0.19GB | Faults: 36732
panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
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.1.12/wa143f0913AihghgEwv92b8x8hZ+96kXotglXwlzweu62xeg6zxew033G28vh2C6+hyFA2DDerror: script "serve" exited with code 3
Stack Trace (bun.report)
Bun v1.1.12 (43f0913) on windows x86_64 [AutoCommand]
How can we reproduce the crash?
The server code is very simple:
the source directory is watched with Nodemon:
which runs a more lengthy build script that places resulting files in
dist
directory.Crash occurred when adding a new file to the source directory, having it built, and placed in the dist directory.
Relevant log output
Stack Trace (bun.report)
Bun v1.1.12 (
43f0913
) on windows x86_64 [AutoCommand]Segmentation fault at address 0xFFFFFFFFFFFFFFFF
server.zig:2235
:onReadFile
ReadFile.zig:588
:finalize
ReadFile.zig:629
:onFileOpen
blob.zig:1768
:callback
uv__work_done
??
uv_run
event_loop.zig:1447
:autoTickActive
JSC__VM__holdAPILock
shimmer.zig:186
:cppFn
The text was updated successfully, but these errors were encountered: