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
{{ message }}
Repository navigation
Electron, node-hid, Windows 7, segmentation fault on close() #210
device.write(Array.from(new Buffer('020000', 'hex')));
// some code is being processed in the meantime
device.pause();
device.removeAllListeners("data");
device.removeAllListeners("error");
device.close();
There is no node-hid relevant code executed after.
What are you doing immediately after close? If you're doing process.exit() or similar you will likely have problems because Node doesn't have time to clean up EventListeners
Activity
todbot commentedon Jun 28, 2017
Hi, could you show the code you're using both before and after
close()?randomf commentedon Jun 28, 2017
Hi,
here it goes:
There is no node-hid relevant code executed after.
todbot commentedon Jun 28, 2017
What are you doing immediately after close? If you're doing process.exit() or similar you will likely have problems because Node doesn't have time to clean up EventListeners
randomf commentedon Jun 28, 2017
I'm waiting for an user input in a React application. I don't call process.exit().
pablozandona commentedon Jul 6, 2017
Same problem here.
Node 6.10.3
Windows 7 SP12
node-hid 0.5.4
todbot commentedon Jul 6, 2017
Could someone experiencing this issue submit a small complete code example that illustrates the crash?
todbot commentedon Nov 23, 2019
Closing as I am suspecting this issue has been addressed by moving to libusb/hidapi.
Change async "data" read use hid_read_timeout and check for closed ha…