Skip to content
New issue

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

Creating a database using better-sqlite3 crashes upon calling the constructor #14214

Closed
MarByteBeep opened this issue Sep 27, 2024 · 1 comment
Assignees
Labels
crash An issue that could cause a crash windows An issue that is known to occur on Windows

Comments

@MarByteBeep
Copy link

How can we reproduce the crash?

All you need to call is the following:

import Database from 'better-sqlite3';
const db = new Database('./test.sqlite');

Relevant log output

When using `--watch` a little more output is generated:

107 |         return opts[p] || p;
108 |       })
109 |     );
110 |     tries.push(n);
111 |     try {
112 |       b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
                                                     ^
TypeError: LoadLibrary failed: A dynamic link library (DLL) in
      at bindings (.\node_modules\bindings\bindings.js:112:48)
      at new Database (.\node_modules\better-sqlite3\lib\database.js:48:29)

Stack Trace (bun.report)

Bun v1.1.29 (6d43b36) on windows x86_64 [RunCommand]

Segmentation fault at address 0x7FFA56F14D80

Features: jsc, tsconfig

@MarByteBeep MarByteBeep added the crash An issue that could cause a crash label Sep 27, 2024
@github-actions github-actions bot added the windows An issue that is known to occur on Windows label Sep 27, 2024
@190n 190n self-assigned this Sep 27, 2024
@190n
Copy link
Contributor

190n commented Sep 27, 2024

Duplicate of #4290.

This happens because better-sqlite3 uses some V8 methods Bun doesn't implement yet. Track progress in that issue.

@190n 190n closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash windows An issue that is known to occur on Windows
Projects
None yet
Development

No branches or pull requests

2 participants