kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Segmentation fault on connect. using @abandonware/i2c" #101

Open mitch85 opened 4 years ago

mitch85 commented 4 years ago

After update node to 12.x and update i2c to lates version of @abandonware/i2c. I got a segmentation fault on new i2c();

before with node v 8.x it works perfectly

here some Errors

13 verbose stack Exit status 139 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

hire-vladimir commented 4 years ago

Also seeing Segmentation fault on new i2c() using node v12.18.1

pi@homebridge:~ $ node -v
v12.18.1
pi@homebridge:~ $ cat test.js
var i2c = require('@abandonware/i2c');
var address = 0x5c;
console.log("set address");
var wire = new i2c(address, {device: '/dev/i2c-1'}); 
console.log("init wire");
pi@homebridge:~ $ node test.js
set address
Segmentation fault
pi@homebridge:~ $
raniglas commented 4 years ago

Same here - segmentation fault on new i2c() with node v11.15.0

var i2c = require('@abandonware/i2c');
var address = 0x21;
var wire = new i2c(address, {device: '/dev/i2c-1'}); 
Segmentation fault (core dumped)

This is on Raspberry Pi4 aarch64.

rzr commented 3 years ago

Please confirm on latest release

Also comment welcome at:

https://github.com/kelly/node-i2c/issues/97