Skip to content

better-sqlite3 crashes on windows version v1.2.5 (0x7FFE7597A4B0) #18219

Closed as duplicate of#4290
@karemont

Description

@karemont

How can we reproduce the crash?

Run the following script using bun and node

test.js

import Database from 'better-sqlite3';

const db = new Database('sqlite.db');

console.log(db.prepare('SELECT 1 + 1 AS result')
	.all());

version used [email protected]

Relevant log output

bun test.js
107 |         return opts[p] || p;
108 |       })
109 |     );
110 |     tries.push(n);
111 |     try {
112 |       b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
                                                     ^
error: LoadLibrary failed: A dynamic link library (DLL) in
 code: "ERR_DLOPEN_FAILED"

      at bindings (C:\[REDACTED]\bun\node_modules\bindings\bindings.js:112:48)
      at new Database (C:\[REDACTED]\bun\node_modules\better-sqlite3\lib\database.js:48:29)
      at C:\[REDACTED]\bun\test.js:4:12

Bun v1.2.5 (Windows x64)
============================================================
Bun v1.2.5 (013fdddc) Windows x64
Windows v.win10_cu
CPU: sse42 avx avx2
Args: "C:\Users\[REDACTED]\.bun\bin\bun.exe" "test.js"
Features: jsc tsconfig tsconfig_paths process_dlopen
Builtins: "bun:main" "node:fs" "node:path" "node:util" "node:util/types"
Elapsed: 193ms | User: 31ms | Sys: 93ms
RSS: 0.14GB | Peak: 0.14GB | Commit: 0.20GB | Faults: 35388

panic(main thread): Segmentation fault at address 0x7FFE7597A4B0

Stack Trace (bun.report)

Bun v1.2.5 (013fddd) on windows x86_64 [RunCommand]

Segmentation fault at address 0x7FFED7729F50

Features: tsconfig, process_dlopen, jsc

Sentry Issue: BUN-8RS

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crashruntimewindowsAn issue that is known to occur on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions