Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening SerialPort on BeagleBone causes Fatal Error #41

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

Opening SerialPort on BeagleBone causes Fatal Error #41

michaelcdillon opened this issue Mar 31, 2012 · 1 comment

Comments

@michaelcdillon
Copy link

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.

@michaelcdillon
Copy link
Author

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant