cheery / node-udev

Bindings to libudev
35 stars 31 forks source link

Incompatibility with latest node version #18

Closed benburkhart1 closed 7 years ago

benburkhart1 commented 7 years ago

Using node v7.9.0 on Ubuntu 16.04, your module does not work. I had previously been using it with node v4.4.4 without issues.

Upon requiring your module, my application dies with this message:

#
# Fatal error in ../deps/v8/src/api.cc, line 1062
# Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
#

==== C stack trace ===============================

    node(v8::base::debug::StackTrace::StackTrace()+0x16) [0x1581cb6]
    node(V8_Fatal+0xd6) [0x157c9d6]
    node(v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)+0xf7) [0xa9c607]
    /home/bedroom/shs-new-dev/hydra-autodiscovery-refactor/node_modules/udev/build/Release/udev.node(+0x4234) [0x7fefa13e8234]
    node(node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)+0x325) [0x12ba9c5]
    node(v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))+0x141) [0xac4a41]
    node() [0xb4702c]
    node(v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)+0x155) [0xb47525]
    [0x961432043a7]
Illegal instruction

I suspect this is due to changes within v8 and your usage around here:

https://github.com/cheery/node-udev/blob/master/udev.cc#L246

I've never dived too deeply into v8 internals, but I'd like to help out, but wanted to report this in case I could not create a PR for this issue.

benburkhart1 commented 7 years ago

It turns out you had previously fixed this by upgrading nan and I had a stale version. Excuse the error report.