-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope #440
Comments
You have to actually declare your handle scopes. It should be |
Here's my code: Local<Value> GNFile::NewInstance(GrooveFile *file) {
Nan::EscapableHandleScope scope;
Local<Function> cons = Nan::New(constructor);
Local<Object> instance = cons->NewInstance();
GNFile *gn_file = node::ObjectWrap::Unwrap<GNFile>(instance);
gn_file->file = file;
return scope.Escape(instance);
} Backtrace of the abort:
file.cc:46 is |
you nailed it though, I replaced all the |
Any solution to above problem? I am getting same error while using "java" node module with node v 4.x.x. It was ok til node v 0.10.36. |
Declare |
I have a similar issue where this error occurs in the line where I declare an It doesn't make sense to have to declare a Code can be found here |
No, that does not make sense. Let's see now. There's a mention of some issue workaround, that should not happen or be necessary. It seems to be a remnant of something old, there is no reason it would return a bad handle in this day and age. Remove that and the |
Actually, that code has been wrong forever. Already this commit was an incorrect fix: eelcocramer/node-bluetooth-serial-port@7eeb85f |
Thanks a lot for the feedback! |
I think I saw similar weirdness (besides that strange 'fix') pop up in other places while skimming through the code base, so better do a thorough inspection of the code for all platforms. Every function not directly exposed to V8 which creates handles (or does anything with V8 to be sure) should have a |
👍 |
…ter gc works well without declearing HandleScope. Ref: nodejs/nan#440
When testing my native addon with iojs 3 I get
I'm following the pattern in test/cpp/objectwraphandle.cpp. The line it crashes on is this one:
I tried to run the test to see if it would pass, but #439 happened.
The text was updated successfully, but these errors were encountered: