node-v4l2camera
node-v4l2camera copied to clipboard
core dump when running `examples/capture-via-yuyv.js`
When I enter a empty folder, npm install my fork (which merely implements the fix described in #30), npm install pngjs, and try to run the example indicated, the core dumps:
$ node node_modules/v4l2camera/examples/capture-via-yuyv.js
w: 352 h: 288
#
# Fatal error in ../deps/v8/src/objects.cc, line 3044
# Check failed: receiver->IsJSFunction().
#
==== C stack trace ===============================
node(v8::base::debug::StackTrace::StackTrace()+0x16) [0x1583c76]
node(V8_Fatal+0xd6) [0x157e996]
node() [0xfd5c0f]
node(v8::Object::CreationContext()+0x11) [0xaac451]
node(node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)+0x32) [0x12bd4c2]
/home/troyw/code-local/experiments/v4l2camera/node_modules/v4l2camera/build/Release/v4l2camera.node(+0x5548) [0x7fda9e258548]
node() [0x1577a48]
node(uv_run+0x156) [0x1567d96]
node(node::Start(uv_loop_s*, int, char const* const*, int, char const* const*)+0x6d7) [0x12c2e27]
node(node::Start(int, char**)+0x104) [0x12c2174]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fdaa04853f1]
node() [0x8f0111]
Illegal instruction (core dumped)
I'm encountering a similar issue. Error is:
#
# Fatal error in ../deps/v8/src/objects.cc, line 3179
# Check failed: receiver->IsJSFunction().
#
==== C stack trace ===============================
Aborted
Code I'm running:
var fs = require('fs');
var v4l2camera = require('v4l2camera');
var cam = new v4l2camera.Camera('/dev/video0');
cam.start();
cam.capture(function(success) {
var frame = cam.frameRaw();
fs.createWriteStream('result_test.jpg').end(Buffer(frame));
cam.stop(function() {
console.log('reached the end')
});
});
Running on Raspbian.
The same issue here with an Raspberry Pi 3 Model B. How can i capture the image?
https://pixelchinchilla.com/2017/05/diy-video-monitoring-system-part-ii-taking-and-hosting-pictures-with-node-js/ This blog introduces node-v4l2camera with no error. But I got the same error for yuyv webcam. Raspberry Pi 3 Model B
Fatal error in ../deps/v8/src/objects.cc, line 3179 check failed: receiver->IsJSFunction().
It seems that cam.stop
must have a callback as argument.