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

V8 fatal error #30

Closed
PeterBorisenko opened this issue Oct 1, 2015 · 8 comments
Closed

V8 fatal error #30

PeterBorisenko opened this issue Oct 1, 2015 · 8 comments
Assignees
Labels

Comments

@PeterBorisenko
Copy link

Hi.
While handling interrupt I've got the following error:
FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope

My code is below:

var gpio = require('wiring-pi');
gpio.setup('wpi');

//inputs
var signalStartMovie= 7;
//outputs
var signalMovieEnded= 5;

gpio.pinMode(signalMovieEnded, gpio.OUTPUT);
gpio.pinMode(signalStartMovie, gpio.INPUT);
gpio.pullUpDnControl(signalStartMovie, gpio.PUD_UP);

gpio.wiringPiISR(7, gpio.INT_EDGE_FALLING, function(delta) {
    console.log("Interrupt!", delta);
    //gpio.wiringPiISRCancel(signalStartMovie);
});

setInterval(function () {
    gpio.digitalWrite(signalMovieEnded, gpio.HIGH);
    console.log(gpio.digitalRead(signalStartMovie));
    setTimeout(function () {
        gpio.digitalWrite(signalMovieEnded, gpio.LOW);
    }, 500);
}, 1000);

What is this? How to solve?

@nekuz0r
Copy link
Collaborator

nekuz0r commented Oct 19, 2015

Which version of nodejs are you using ?

@PeterBorisenko
Copy link
Author

C:\Windows\System32>node --version
v0.12.4

@nekuz0r
Copy link
Collaborator

nekuz0r commented Oct 21, 2015

Is it reproducible with your code ?
Is it happening directly or random ?

@xseignard
Copy link

Hello same error here.

With Raspbian Jessie Lite, node v4.2.1 and 2.1.0 of this module.

Here is a simple code that makes V8 crash, and it seems to be reproducible.

var wpi = require('wiring-pi');
var btnPin = 4;

wpi.setup('wpi');
wpi.pinMode(btnPin, wpi.INPUT);
wpi.pullUpDnControl(btnPin, wpi.PUD_UP);
wpi.wiringPiISR(btnPin, wpi.INT_EDGE_FALLING, function(delta) {
    console.log('btnPin changed to LOW (', delta, ')');
});

@nekuz0r nekuz0r added the bug label Nov 30, 2015
@nekuz0r nekuz0r self-assigned this Nov 30, 2015
@benallen-dev
Copy link

I am getting this issue also, it occurs even when using the sample code in the documentation.

A workaround could be implemented using polling instead of interrupts but I haven't tested this approach yet.

@benallen-dev
Copy link

PS I'm using Raspbian Wheezy, all up to date.

taoyuan added a commit to taoyuan/wirio that referenced this issue Dec 31, 2015
@Illizian
Copy link

Illizian commented Jan 1, 2016

👍 I'm also seeing this issue, with the example code and a simple push button.

$ uname -a
Linux alarmpi 4.1.15-1-ARCH #1 Tue Dec 15 18:28:56 MST 2015 armv6l GNU/Linux

$ node --version
v5.3.0

UPDATE: @taoyuan's fix #34 resolves this for me.

nekuz0r added a commit that referenced this issue Jan 5, 2016
Added scope for dispatchInterrupt and solved #30
@nekuz0r
Copy link
Collaborator

nekuz0r commented Jan 5, 2016

Fixed, closing

@nekuz0r nekuz0r closed this as completed Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants