EyalAr / lwip

Light Weight Image Processor for NodeJS
MIT License
2.36k stars 230 forks source link

Segfault with bcrypt #144

Open westito opened 9 years ago

westito commented 9 years ago

After I started using bcrypt, the lwip module stopped working. I get two different errors. When bcrypt loaded (require) before lwip, i get:

PID 19494 received SIGSEGV for address: 0x0 0 segfault-handler.node 0x00000001047f290f _ZL16segfault_handleriP9siginfoPv + 287 1 libsystem_platform.dylib 0x00007fff924d8f1a _sigtramp + 26 2 ??? 0x0000000000000000 0x0 + 0 3 node 0x0000000100126093 _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi + 259 4 bcrypt_lib.node 0x00000001017f0bf5 _ZN14NanAsyncWorker19HandleErrorCallbackEv + 83 5 bcrypt_lib.node 0x00000001017f0b52 _ZN14NanAsyncWorker12WorkCompleteEv + 58 6 bcrypt_lib.node 0x00000001017f0a58 _Z23NanAsyncExecuteCompleteP9uv_work_s + 18 7 node 0x000000010061cd9f uv__work_done + 175 8 node 0x000000010061e68d uvasync_event + 65 9 node 0x000000010061e810 uv__async_io + 136 10 node 0x000000010062c42e uv__io_poll + 1526 11 node 0x000000010061ec8b uv_run + 280 12 node 0x0000000100516aa6 _ZN4node5StartEiPPc + 339 13 node 0x0000000100000cb4 start + 52

If bcrpyt loaded after lwip:

node(20265,0x7fff7ae55300) malloc: * error for object 0x1033001d0: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug Abort trap: 6

EyalAr commented 9 years ago

It works for me...

Please include some more info about your system

pejalo commented 9 years ago

I'm also getting "Segmentation fault: 11" when trying to invoke "open()" in my sails.js app. (My source file string is an absolute reference to the image object.)

All I did was follow the instuctions for "npm install lwip": https://gist.github.com/pejalo/8eacb55cea1a53b87235

OSX Yosemite node -v v0.12.0 npm -v 2.5.1 lwip version 0.0.6

I also happen to be using bcrypt 0.8.1 Let me know what other info I can provide

samzilverberg commented 9 years ago

also happening to me

but only on bcrypt version 0.8.2 or higher (didnt try 0.8.1) on 0.8.0 and 0.7.X it works.

pejalo commented 9 years ago

Thanks @samzilverberg ! I downgraded to bcrypt 0.8.0 and now it works for me too.