We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It crashes for me in this function:
export async function vectorize( filePath: string, outputPath: string, width: number, height: number, ) { console.log("Vectorizing", filePath); const formData = new FormData(); const file = Bun.file(filePath); formData.append("image", file); formData.append("output.size.width", width.toString()); formData.append("output.size.height", height.toString()); formData.append("output.size.unit", "px"); const response = await fetch( "https://vectorizer.ai/api/v1/vectorize?mode=test", { method: "POST", headers: { Authorization: "Basic XXX", }, body: formData, }, ); if (!response.ok) { console.error("Error:", response.status, await response.text()); return; } const blob = await response.blob(); return Bun.write(outputPath, blob); }
When I remove formData.append("image", file);, it doesn't throw this error. I am running the same function on WSL too, which works well.
formData.append("image", file);
============================================================ Bun v1.1.28 (cf4e9cb6) Windows x64 Windows v.win10_fe CPU: sse42 avx avx2 Args: "C:\Users\DevLeon\.bun\bin\bun.exe" "run" "stormgate.ts" "--tiles" Features: jsc fetch tsconfig Builtins: "bun:main" "node:buffer" "node:fs" "node:module" "node:os" "node:path" "node:stream" "node:string_decoder" "node:url" "node:util" "node:util/types" "node:zlib" Elapsed: 1206ms | User: 250ms | Sys: 31ms RSS: 0.43GB | Peak: 0.43GB | Commit: 0.60GB | Faults: 123406 panic(main thread): incorrect alignment 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:
Bun v1.1.27 (267afa2) on windows x86_64 [RunCommand]
267afa2
panic: incorrect alignment
ArenaAllocator.zig:170
createNode
ArenaAllocator.zig:206
alloc
Allocator.zig:240
allocBytesWithAlignment
StringJoiner.zig:53
pushStatic
DOMFormData.cpp:74
DOMFormData__forEach
blob.zig:581
fromDOMFormData
response.zig:2593
Bun__fetch
llint_entry
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How can we reproduce the crash?
It crashes for me in this function:
When I remove
formData.append("image", file);
, it doesn't throw this error.I am running the same function on WSL too, which works well.
Relevant log output
Stack Trace (bun.report)
Bun v1.1.27 (
267afa2
) on windows x86_64 [RunCommand]panic: incorrect alignment
ArenaAllocator.zig:170
:createNode
ArenaAllocator.zig:206
:alloc
Allocator.zig:240
:allocBytesWithAlignment
StringJoiner.zig:53
:pushStatic
DOMFormData.cpp:74
:DOMFormData__forEach
blob.zig:581
:fromDOMFormData
response.zig:2593
:Bun__fetch
llint_entry
The text was updated successfully, but these errors were encountered: