You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into a segfault when trying to render a PDF using pdf.js onto a canvas instance.
I have tried to run node with GDB and this is the output. It seems like the segfault happens inside a libcairo that comes pre-bundled with another package.
free(): invalid pointer
Thread 1 "node" received signal SIGABRT, Aborted.
0x00007ffff7ab19e5 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff7ab19e5 in raise () from /lib64/libc.so.6
#1 0x00007ffff7a9a8a4 in abort () from /lib64/libc.so.6
#2 0x00007ffff7af4007 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff7afbcdc in malloc_printerr () from /lib64/libc.so.6
#4 0x00007ffff7afd0ac in _int_free () from /lib64/libc.so.6
#5 0x00007fffd74780e5 in ?? ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#6 0x00007fffd747ae16 in ?? ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#7 0x00007fffd74e08c0 in ?? ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#8 0x00007fffd7483a58 in ?? ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#9 0x00007fffd747da71 in ?? ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#10 0x00007fffd74f09ca in cairo_paint_with_alpha ()
from /home/emi/Projects/authory/api/node_modules/sharp/build/Release/../../vendor/lib/libcairo.so.2
#11 0x00007fffd4b16d1f in Context2d::DrawImage(Nan::FunctionCallbackInfo<v8::Value> const&) ()
from /home/emi/Projects/authory/common/node_modules/node-canvas/build/Release/canvas.node
#12 0x00007fffd4b0b9f8 in Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) ()
from /home/emi/Projects/authory/common/node_modules/node-canvas/build/Release/canvas.node
[omitted]
When I remove the other package from the project, the code works normally.
How can I configure node-canvas to load the libcairo I have installed on my OS, or another version that is appropriate?
I think this is a variation of #930. I haven't looked at the issue in a long time though. Node-canvas prebuilds use the latest versions of Cairo/etc., and it specifically loads the SOs that we bundle, so I'm not sure what the conflict is anymore.
I am running into a segfault when trying to render a PDF using pdf.js onto a canvas instance.
I have tried to run node with GDB and this is the output. It seems like the segfault happens inside a
libcairo
that comes pre-bundled with another package.When I remove the other package from the project, the code works normally.
How can I configure node-canvas to load the
libcairo
I have installed on my OS, or another version that is appropriate?Environment
[email protected]
Fedora release 33
Node v12.22.1
The text was updated successfully, but these errors were encountered: