{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node-addon-api/issues/372","repository_url":"https://api.github.com/repos/nodejs/node-addon-api","labels_url":"https://api.github.com/repos/nodejs/node-addon-api/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node-addon-api/issues/372/comments","events_url":"https://api.github.com/repos/nodejs/node-addon-api/issues/372/events","html_url":"https://github.com/nodejs/node-addon-api/issues/372","id":371825058,"node_id":"MDU6SXNzdWUzNzE4MjUwNTg=","number":372,"title":"Fatal error with ObjectWrap since 1.5.0","user":{"login":"BotellaA","id":3213882,"node_id":"MDQ6VXNlcjMyMTM4ODI=","avatar_url":"https://avatars1.githubusercontent.com/u/3213882?v=4","gravatar_id":"","url":"https://api.github.com/users/BotellaA","html_url":"https://github.com/BotellaA","followers_url":"https://api.github.com/users/BotellaA/followers","following_url":"https://api.github.com/users/BotellaA/following{/other_user}","gists_url":"https://api.github.com/users/BotellaA/gists{/gist_id}","starred_url":"https://api.github.com/users/BotellaA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BotellaA/subscriptions","organizations_url":"https://api.github.com/users/BotellaA/orgs","repos_url":"https://api.github.com/users/BotellaA/repos","events_url":"https://api.github.com/users/BotellaA/events{/privacy}","received_events_url":"https://api.github.com/users/BotellaA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-19T06:37:39Z","updated_at":"2018-10-19T20:04:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I update to node-addon-api 1.5.0 (from 1.4.0) and I got this error at runtime using gdb\r\n```\r\n#\r\n# Fatal error in , line 0\r\n# Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().\r\n#\r\n#\r\n#\r\n#FailureMessage Object: 0x7fffffffb220\r\nThread 1 \"node\" received signal SIGILL, Illegal instruction.\r\n0x00000000016abfa9 in v8::base::OS::Abort() ()\r\n```\r\nand this stack\r\n```\r\n#0 0x00000000016abfa9 in v8::base::OS::Abort() ()\r\n#1 0x00000000016a8a94 in V8_Fatal(char const*, int, char const*, ...) ()\r\n#2 0x0000000000b04353 in v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute) ()\r\n#3 0x00000000008eac00 in napi_define_class ()\r\n#4 0x00007ffff406c218 in Napi::ObjectWrap<genepi::ClassWrapper<Test> >::DefineClass(Napi::Env, char const*, unsigned long, napi_property_descriptor const*, void*) ()\r\nfrom /home/camaud/programming/genepi/build/Release/genepi.node\r\n#5 0x00007ffff406e10c in genepi::BindClass<Test>::initialize(Napi::Env&, Napi::Object&) const () from /home/camaud/programming/genepi/build/Release/genepi.node\r\n#6 0x00007ffff406f322 in initialize(Napi::Env, Napi::Object) () from /home/camaud/programming/genepi/build/Release/genepi.node\r\n#7 0x00007ffff406f4ac in __napi_initialize(napi_env__*, napi_value__*) () from /home/camaud/programming/genepi/build/Release/genepi.node\r\n#8 0x00000000008e14a1 in napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*)) ()\r\n#9 0x00000000008d3352 in node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) ()\r\n#10 0x0000000000b8b32f in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) ()\r\n#11 0x0000000000b8be99 in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()\r\n```\r\n\r\nDo you have an idea why this crashes in 1.5.0 and not in 1.4.0? I had the same crash on several computers with several gcc and node versions. Any major changes in  Napi::ObjectWrap<T >::DefineClass?\r\n\r\nThanks for your help!"},"comment":{"url":"https://api.github.com/repos/nodejs/node-addon-api/issues/comments/431483432","html_url":"https://github.com/nodejs/node-addon-api/issues/372#issuecomment-431483432","issue_url":"https://api.github.com/repos/nodejs/node-addon-api/issues/372","id":431483432,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQ4MzQzMg==","user":{"login":"BotellaA","id":3213882,"node_id":"MDQ6VXNlcjMyMTM4ODI=","avatar_url":"https://avatars1.githubusercontent.com/u/3213882?v=4","gravatar_id":"","url":"https://api.github.com/users/BotellaA","html_url":"https://github.com/BotellaA","followers_url":"https://api.github.com/users/BotellaA/followers","following_url":"https://api.github.com/users/BotellaA/following{/other_user}","gists_url":"https://api.github.com/users/BotellaA/gists{/gist_id}","starred_url":"https://api.github.com/users/BotellaA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BotellaA/subscriptions","organizations_url":"https://api.github.com/users/BotellaA/orgs","repos_url":"https://api.github.com/users/BotellaA/repos","events_url":"https://api.github.com/users/BotellaA/events{/privacy}","received_events_url":"https://api.github.com/users/BotellaA/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T20:04:59Z","updated_at":"2018-10-19T20:04:59Z","author_association":"CONTRIBUTOR","body":"Here  is the debug stack\r\n```#0  0x00000000016abfa9 in v8::base::OS::Abort() ()\r\n#1  0x00000000016a8a94 in V8_Fatal(char const*, int, char const*, ...) ()\r\n#2  0x0000000000b04353 in v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute) ()\r\n#3  0x00000000008eac00 in napi_define_class ()\r\n#4  0x00007fffdfde0728 in Napi::ObjectWrap<genepi::ClassWrapper<Test> >::DefineClass (env=..., \r\n    utf8name=0x7fffdffff978 <genepi::BindClass<Test>::getInstance()::instance+24> \"Test\", props_count=4, descriptors=0x251d1f0, data=0x0)\r\n    at /home/camaud/programming/genepi/node_modules/node-addon-api/napi-inl.h:2882\r\n#5  0x00007fffdfddf2c2 in Napi::ObjectWrap<genepi::ClassWrapper<Test> >::DefineClass (env=..., \r\n    utf8name=0x7fffdffff978 <genepi::BindClass<Test>::getInstance()::instance+24> \"Test\", properties=std::vector of length 4, capacity 4 = {...}, data=0x0)\r\n    at /home/camaud/programming/genepi/node_modules/node-addon-api/napi-inl.h:2951\r\n#6  0x00007fffdfdde834 in genepi::ClassWrapper<Test>::Initialize (env=..., \r\n    target=..., name=\"Test\", \r\n    static_methodList=std::deque with 1 element = {...}, \r\n    methodList=std::deque with 3 elements = {...})\r\n    at /home/camaud/programming/genepi/include/genepi/class_wrapper.h:38\r\n#7  0x00007fffdfdde406 in genepi::BindClass<Test>::initialize (\r\n    this=0x7fffdffff960 <genepi::BindClass<Test>::getInstance()::instance>, \r\n    env=..., target=...)\r\n    at /home/camaud/programming/genepi/include/genepi/bind_class.h:32\r\n#8  0x00007fffdfde5f06 in initialize (env=..., exports=...)\r\n    at /home/camaud/programming/genepi/src/genepi/genepi.cpp:3\r\n#9  0x00007fffdfde623f in Napi::RegisterModule(napi_env__*, napi_value__*, Napi::Object (*)(Napi::Env, Napi::Object))::{lambda()#1}::operator()() const (\r\n    __closure=0x7fffffffbb50)\r\n    at /home/camaud/programming/genepi/node_modules/node-addon-api/napi-inl.h:222\r\n#10 0x00007fffdfde62c4 in Napi::details::WrapCallback<Napi::RegisterModule(napi_env__*, napi_value__*, Napi::Object (*)(Napi::Env, Napi::Object))::{lambda()#1}>(Napi::RegisterModule(napi_env__*, napi_value__*, Napi::Object (*)(Napi::Env, Napi::Object))::{lambda()#1}) (callback=...)\r\n    at /home/camaud/programming/genepi/node_modules/node-addon-api/napi-inl.h:104\r\n#11 0x00007fffdfde62ac in Napi::RegisterModule (env=0x2541500, \r\n    exports=0x251df18, \r\n    registerCallback=0x7fffdfde5cf2 <initialize(Napi::Env, Napi::Object)>)\r\n    at /home/camaud/programming/genepi/node_modules/node-addon-api/napi-inl.h:224\r\n#12 0x00007fffdfde5f6c in __napi_initialize (env=0x2541500, exports=0x251df18)\r\n    at /home/camaud/programming/genepi/src/genepi/genepi.cpp:3\r\n#13 0x00000000008e14a1 in napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*)) ()\r\n#14 0x00000000008d3352 in node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) ()\r\n#15 0x0000000000b8b32f in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) ()\r\n#16 0x0000000000b8be99 in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()\r\n```\r\n\r\nThe code is not open yet but if we cannot find the issue, I will send some files to you."}}
{"actor":{"display_login":"BotellaA"}}