Opening SerialPort on BeagleBone causes Fatal Error #41

Closed
michaelcdillon opened this Issue Mar 31, 2012 · 1 comment

Comments

Projects
None yet
1 participant

I'm trying to use the serial ports on a BeagleBone. When I create a new serail port object it immediately crashes with
FATAL ERROR: v8::HandleScope::Close() Local scope has already been closed.

I have run my code on a regular machine and it works properly. So this seems to be an architecture issue (BeagleBone runs on an arm7). I'm not sure where to begin to look for the issue, but I would gladly accept some pointers.

Here is the function where it is failing:

var openSerialPort = function () {
    port = new serialPort.SerialPort (UART_CONFIG.uart1.path, {
        baudRate : 9600,
        parser : serialPort.parsers.raw
    });
    console.log ("Serial Port setup and running...");
    port.on ("data", function (data) {
        port.write (data);  
            console.log (data);
    });
    port.on ('close', function (data) {
        console.log ('serialport closed');
    });
};

If you are interested, this is the rest of the file containing the function.

Not sure how this happened, but after removing and re-installing the module (after I mucked with the native code enough that I wanted to start fresh) everything now works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment