-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
"Segmentation fault" in worker thread on ubuntu #377
Comments
I'll dig into this problem. BTW, you don't need run |
I also have this problem。When I |
@rambo-panda what's your Node.js version, crash on Node@12 is a known issue nodejs/node#42376 |
Please don't use Promise.all([
canvas.encode('png'),
canvas.encode('webp'),
canvas.encode('jpg'),
canvas.encode('avif'),
]) The code snippets will start 4 threads and resolve the result when the task is completed. |
{
node: '14.15.4',
v8: '8.4.371.19-node.17',
uv: '1.40.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.16.1',
modules: '83',
nghttp2: '1.41.0',
napi: '7',
llhttp: '2.1.3',
openssl: '1.1.1i',
cldr: '37.0',
icu: '67.1',
tz: '2020a',
unicode: '13.0'
} |
When running the library inside a worker thread on ubuntu (I had no problems running the exact same code on windows, same library and nodejs version), the program exits with the message "Segmentation fault". The image gets rendered and transferred to the main thread correctly, but as soon as the worker exits, the main thread will terminate too.
Example code:
Output:
Versions:
NodeJS: v16.11.1
@napi-rs/canvas: 0.1.13
Ubuntu: 18.04.5 LTS
The text was updated successfully, but these errors were encountered: