node-v4l2camera icon indicating copy to clipboard operation
node-v4l2camera copied to clipboard

core dump when running `examples/capture-via-yuyv.js`

Open troywweber7 opened this issue 7 years ago • 4 comments

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)

troywweber7 avatar Jun 26 '17 21:06 troywweber7

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.

knaut avatar Jul 21 '17 03:07 knaut

The same issue here with an Raspberry Pi 3 Model B. How can i capture the image?

MiguelGonzalezAravena avatar Oct 11 '17 16:10 MiguelGonzalezAravena

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().

Nasil avatar Jan 18 '18 06:01 Nasil

It seems that cam.stop must have a callback as argument.

sigoden avatar Jun 12 '18 02:06 sigoden