lwille / node-gphoto2

A Node.js wrapper for libgphoto2
MIT License
296 stars 91 forks source link

GPhoto2 and Socket.IO incompatible #124

Closed Fabiansson closed 3 years ago

Fabiansson commented 5 years ago

In my project everything is working fine without GPhoto2 or without Socket.IO. Im using very fast loops with setInterval to redo certain tasks which have nothing to do with GPhoto2 nor Socket.IO. In fact all I do right now with GPhoto2 is this:

var gphoto2 = require('gphoto2');
var GPhoto = new gphoto2.GPhoto2();

And I'm not even using the GPhoto object. If I uncomment this last line everything works fine again. With this line in my code I get either a Bus Error 10(rare) or a Segmentation fault 11 either at the beginning or after a short while. If I don't use Socket.IO no error occurs either.

I created a dump of my Segfault:

PID 3855 received SIGSEGV for address: 0x8
0   segfault-handler.node               0x00000001039e20f8 _ZL16segfault_handleriP9__siginfoPv + 312
1   libsystem_platform.dylib            0x00007fff772b1f5a _sigtramp + 26
2   ???                                 0x0000000000000410 0x0 + 1040
3   node                                0x000000010076683c uv__io_poll + 1704
4   node                                0x00000001007577c9 uv_run + 314
5   node                                0x0000000100040407 _ZN4node5StartEPN2v87IsolateEPNS_11IsolateDataERKNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEESG_ + 1127

Im using:

gphoto2         2.5.23         clang, popt(m), no exif, no cdk, no aa, jpeg, readline
libgphoto2      2.5.23         all camlibs, clang, ltdl, no EXIF

node: v.11.2.0
npm: 6.10.1

Project dependencies:

"dependencies": {
    "express": "^4.16.4",
    "gphoto2": "^0.3.0",
    "socket.io": "^2.2.0"
  }

I have a repo to replicate my issue:

https://github.com/Fabiansson/socket.io-fiddle

You should start the application from server.js and shortly after it should throw the errors.

Thanks for any help!

sops21 commented 4 years ago

Did you ever resolve this?

lwille commented 3 years ago

Closing this; feel free to reopen if this still a problem.