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

Incompatible with electron v21 #95

Closed
vladimiry opened this issue Oct 1, 2022 · 3 comments · Fixed by #97
Closed

Incompatible with electron v21 #95

vladimiry opened this issue Oct 1, 2022 · 3 comments · Fixed by #97

Comments

@vladimiry
Copy link

Test code (executed as: npx electron index.js):

const {compress} = require("snappy");
const {randomBytes} = require("crypto");
const {writeFile} = require("fs/promises");

(async () => {
    await writeFile(
        `./snappy-archive-${Date.now()}.bin`,
        await compress(
            randomBytes(/*1 KB:*/1024 * 100),
        ),
    );
    process.exit(0);
})();

SIGSEGV error:

[28878:1001/195712.022506:ERROR:node_bindings.cc(146)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers.
[28915:0100/000000.927082:ERROR:broker_posix.cc(43)] Invalid node channel message

Possibly related issue: nodejs/abi-stable-node#441.

@vladimiry
Copy link
Author

vladimiry commented Oct 5, 2022

It/v7.2.0 is still incompatible with @electron v21, see console output of running npx electron index.js command:

[183750:1005/180415.439470:ERROR:node_bindings.cc(146)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers.
[183753:0100/000000.252101:ERROR:zygote_linux.cc(610)] Zygote could not fork: process_type gpu-process numfds 3 child_pid -1
[183753:0100/000000.252262:ERROR:zygote_linux.cc(642)] write: Broken pipe (32)

Works fine if I switch to @electron v20.

@Brooooooklyn
Copy link
Owner

@vladimiry did you call the compress with { copyOutputData: true }?

@vladimiry
Copy link
Author

@Brooooooklyn the test code is in the original message, so nope. Can confirm that it works with copyOutputData: true option. Thanks for the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants