I have a problem creating an array using the v8 engine. This is what I got so far:
void function(Isolate* isolate) {
EscapableHandleScope scope(isolate);
Local<Array> array = Array::New(isolate, n);
...
}
But my program crashes every time when it reaches the second line. This is the output I receive:
==== C stack trace ===============================
v8::internal::Scope::set_start_position [0x000002A7A393E69E+10258841]
v8::internal::Scope::set_start_position [0x000002A7A37A1C63+8568670]
v8::internal::Scope::set_start_position [0x000002A7A37A1E02+8569085]
v8::internal::Scope::set_start_position [0x000002A7A3004CBC+585655]
I have already tried to create an integer or another object in this function. There it works perfectly. Any idea what went wrong here?
I find out what went wrong. But I am not 100% sure why. After i put the Array initialization in a Context_Scope, it worked. But why had it worked for an Integer initialization (without the context scope)?