Skip to content

Bug: Segmentation fault when using ONNX runtime on Windows #28008

Open

Description

@pedritojr1209

Bug: Segmentation fault when using ONNX runtime on Windows

Description

Bun crashes with a segmentation fault when loading ONNX runtime (onnxruntime.dll) on Windows 10 x64.

Reproduction

  1. Use OpenCode (which bundles Bun v1.3.10)
  2. Try to use journal feature of opencode-agent-memory plugin (which uses ONNX embeddings)
  3. Bun crashes with segfault

Crash details

Additional context

  • The crash occurs in onnxruntime.dll
  • Happens when loading local ONNX model for embeddings (all-MiniLM-L6-v2)

Activity

  1. romuelmartins commented on May 10, 2026

    @romuelmartins

    Same crash described in this issue.

    Bun version: 1.3.13 (bf2e2ce) Windows x64 (baseline) StandaloneExecutable

    Main stack trace:

    • Segmentation fault at address 0x00000004
    • std::_Atomic_storage<unsigned char,1>::load
    • WTF::Atomic::transaction
    • JSC::JSCellLock::lock
    • Bun::NapiHandleScopeImpl::reserveSlot
    • Bun::NapiHandleScope::open
    • napi_open_escapable_handle_scope
    • Called from inside onnxruntime_binding.node

    The crash occurs during model initialization/loading (probably via OpenCode / @xenova/transformers or similar).

    Automatic report: (paste your bun.report link here)

    System: Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions