Skip to content

load node native plugin crashed #15551

Closed as duplicate
Closed as duplicate

Description

@luckyyyyy

How can we reproduce the crash?

https://github.com/luckyyyyy/node-opencv

Relevant log output

============================================================
Bun v1.1.38 (bf2f153f) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2 avx512
Args: "C:\Users\William\.bun\bin\bun.exe" "test.js"
Features: jsc process_dlopen 
Builtins: "bun:main" 
Elapsed: 687ms | User: 31ms | Sys: 0ms
RSS: 106.58MB | Peak: 106.58MB | Commit: 0.14GB | Faults: 26275

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

Stack Trace (bun.report)

Bun v1.1.38 (bf2f153) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x04AF5AF0

  • 1 unknown/js code
  • ??? at 0x1455dcf in node.exe
  • ??? at 0x145582a in node.exe
  • ??? at 0xec2be4 in node.exe
  • ??? at 0xd4b5d6 in node.exe
  • ??? at 0x8a5dbc in node.exe
  • ??? at 0xebdefc in node.exe
  • ??? at 0x38b579 in node.exe
  • ??? at 0x1e9f in node-opencv.node
  • ??? at 0x13a1 in node-opencv.node

Features: process_dlopen, jsc

Sentry Issue: BUN-99V

Activity

  1. added
    crash
    on Dec 3, 2024
  2. added
    windows
    on Dec 3, 2024
  3. heimskr commented on Dec 3, 2024

    @heimskr
    Contributor

    We've been doing some work related to Node native modules in draft PR #14501. Could you please test it by running bunx bun-pr 14501 (make sure you have GitHub CLI installed) to download a build from that PR, and then running your code with the binary it downloads? And/or try running Bun with the --bun flag (bun --bun test.js).

  4. github-actions commented on Nov 25, 2025

    @github-actions
    Contributor

    Found 3 possible duplicate issues:

    1. Crash when requiring native addon on Windows #13566
    2. Bug Report: Bun crashes with segmentation fault when using @roamhq/wrtc #24609
    3. Bun Crash: panic(main thread): Segmentation fault at address 0x0 #15812

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  5. removed their assignment
    on Aug 4, 2026
  6. robobun commented on Aug 15, 2026

    @robobun
    Collaborator

    This is the same Windows crash tracked in #10690: a cmake-js/node-addon-api addon built without node-gyp's win_delay_load_hook imports its napi_* functions from node.exe, so when Bun's process.dlopen loads it the imports bind to a real Node installation and the addon segfaults inside node.exe frames (node-opencv.node here, nodegl.node in #10690). Both reports have the identical .node -> node.exe -> segfault trace and are fixed together by the node.exe import rebinding in #35618, which lists both issues.

    Duplicate of #10690

    Please add a 👍 or any extra details over there so it all stays in one place. If this is actually a different problem, say so here and we'll reopen.

  7. added a commit that references this issue on Oct 20, 2026
    9b4284f
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

    crashruntimewindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions