Hello,
I'm working with a printer device and overhauling some node.js code. Previously, communication was done with set interval reads, with writes in between.
I thought that it could be a good idea to implement a native C polling interface using node-gyp to compile a node.js-compatible addon.
However, I'm having run-time issues : SEGFAULT.
The SEGFAULT happens every time there is a Garbage Collection sweep. Starting node.js with the --expose-gc option and calling `global.gc()' causes an immediate crash.
Since the software turns on a low-capacity/low-power embedded Linux, and we don't have any debug symbols for node.js, I tried replicating it on my system, but I have 0 issue here.
The garbage collection is done, and the program continues to work as intended.
So... I'm kinda lost, and don't know what I'm doing wrong. My code is heavily inspired by the node's serialport module (also using libuv and the uv_poll methods).
Any help would be greatly appreciated, I'm stuck on this.
--
Thomas