  Execute in a thread-safe function auto jscallback = [=](Napi::Env env, Napi::Function jsCallback) { Napi::Object videoFrame = Napi::Object::New(env); videoFrame .Set("width", Napi::Number::New(env, 1920)); //crash happens }
Execute in a thread-safe function
auto jscallback = [=](Napi::Env env, Napi::Function jsCallback)
{
Napi::Object videoFrame = Napi::Object::New(env);
videoFrame .Set("width", Napi::Number::New(env, 1920)); //crash happens
}