-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Summary of Problem
(Please answer all 3)
- What are you trying to do? Query the serial ports.
- What happens? I get a segmentation fault when I plug in a particular device.
- What should have happened? I should have seen the new device added.
Code to Reproduce the Issue
const serialport = require("serialport");
serialport.list().then(currentPorts => {
console.log(currentPorts);
});Versions, Operating System and Hardware
- SerialPort@? 9.0.2
- Node.js v? 12.18.0
- Windows? Linux? Mac? Windows 10
- Hardware and chipset? Dialog DA16200 debug port
The DA16200 appears to create a SerialPort device that windows cannot assign to a COM port. Unfortunately, the node-serialport module segfaults with no indication of an error when it encounters this device: I can't even catch() it and recover, the process just ends. Even when I run with DEBUG=* I see no other messages. Windows Command Prompt prints nothing but Cygwin offers a clue:
Peter@CAPYBARA /cygdrive/c/Users/Peter/serialtmp
$ DEBUG=* node test-serial.js
serialport/bindings loading WindowsBinding +0ms
serialport/stream .list +0ms
Segmentation fault
Here is a picture of the orphan Serial Port appearing in Device Manager:
How do I enable better error handling so that my application doesn't segfault due to serialport?
