Closed boehs closed 1 month ago
Possible duplicate of #11730
I have a similar issue:
// bun install @myriaddreamin/typst.ts @myriaddreamin/typst-ts-web-compiler @myriaddreamin/typst-ts-renderer
// following https://myriad-dreamin.github.io/typst.ts/cookery/guide/all-in-one.html
import { $typst } from '@myriaddreamin/typst.ts/dist/esm/contrib/snippet.mjs';
// The following paths come from https://github.com/Myriad-Dreamin/typst.ts/blob/main/packages/typst.ts/examples/all-in-one-lite.html
import typst_ts_web_compiler_bg from '@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm';
import typst_ts_renderer_bg from '@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm';
$typst.setCompilerInitOptions({
getModule: () => typst_ts_web_compiler_bg,
});
$typst.setRendererInitOptions({
getModule: () => typst_ts_renderer_bg,
});
Bun v1.1.25 (fe62a61
) on macos aarch64 [BuildCommand]
Segmentation fault at address 0x00000004
src.bundler.bundle_v2.LinkerContext.generateChunksInParallel
src.cli.build_command.BuildCommand.exec
src.cli.Cli.start
main
How can we reproduce the crash?
I'm still working on a reproduction. What I know:
eeek!
``` evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: [ "", "" ] prerun(C-node) worker= false Running in main thread, faking onCustomMessage ^C evan@EvanAir pinlog % bun test bun test v1.1.24 (85a32991) oss/server/middleware/auth.spec.ts: ============================================================ Bun v1.1.24 (85a32991) macOS Silicon macOS v14.0 Args: "bun" "test" Features: jsc(2) bunfig macros(5) transpiler_cache(3) tsconfig_paths(2) tsconfig(3) Builtins: "node:fs" "node:fs/promises" "node:os" "node:path" "node:string_decoder" "node:tty" "node:util/types" Elapsed: 806ms | User: 108ms | Sys: 97ms RSS: 92.67MB | Peak: 92.67MB | Commit: 1.07GB | Faults: 1443 panic: Segmentation fault at address 0x8 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.24/Mt185a3299AiiggxD__+zt3Q214kV2463Qmg9kV2463Quv/lV+1q4Quml2QA2AQ zsh: trace trap bun test ```I'm sorta really struggling to create a MRE here, I'm happy to do further debugging to your guidance. I wish I could point to the source repository as well but it isn't fully open source (50% of it is open source here). I would be willing to add you as a collaborator to the private repository if it is deemed necessary.
Edits
/Users/evan/Code/pinlog/oss/mailer/index.ts:
(see below) would also indicate this. If that is the case, the error trace would look likesetup.ts > elysia > helpers > route > mailer/index.ts > {mocked db, macro}
Relevant log output
No response
Stack Trace (bun.report)
or
or
or, by far the weirdest one:
(this error is nonsensical)
or it just works