-
Notifications
You must be signed in to change notification settings - Fork 461
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 with ObjectWrap since 1.5.0 #372
Comments
@BotellaA which precise versions of Node.js have you tried this with? We've had crashes caused by Node.js itself, because it was accessing a stale pointer as part of the execution of |
I tried 8.12, 10.11 and 10.12. |
If we have them properly labelled then these should be the only candiates: [917bd60] - src: remove TODOs by fixing memory leaks (Gabriel Schulhof) #343 |
Guessing that we can eliminate ones which add new functionality, which I think leaves this one unless we have some problems with the instance of a method with the wrong parameters being selected because there are additional options is a possibility(for example [97c4ab5] - src: add Call and MakeCallback that accept cargs (NickNaso) #344) [917bd60] - src: remove TODOs by fixing memory leaks (Gabriel Schulhof) #343 |
I believe [917bd60] did affect the functionality for define class as well, so probably a good candidate. |
@gabrielschulhof since you are already engaged maybe you can help @BotellaA revert that change and see if it is related? |
@BotellaA can you rebuild with Also, can you point me to the source code, if it's open? |
Here is the debug stack
The code is not open yet but if we cannot find the issue, I will send some files to you. |
I read the commit
The idea is to have an automatic wrapper arround a custom class The trick is that the methods are not defined in the To sum up (because I am not sure to be clear...), I want a |
@BotellaA Each function and accessor you define causes the wrapper to allocate data on the heap. This data has to be deleted when it is clear that the accessor or the function will never be called again. It will usually never be called again when it has been garbage-collected. In the case of JS classes this means that the data associated with accessors and prototype methods will be deleted when the JS class itself is garbage-collected, and in the case of static methods the data will be deleted when the static methods are garbage collected, because the static methods can be detached from the class and thus may outlive the class. To reflect this, the new implementation converts static method descriptions to So the reason this does not work anymore is that V8 crashes when attempting to attach a ready-made |
@gabrielschulhof Ok, I understand the need to create |
@BotellaA you can always reach down into N-API for custom behaviour: |
@gabrielschulhof Thanks, I will look into this. Since the error is not on your side, I close the issue. |
I update to node-addon-api 1.5.0 (from 1.4.0) and I got this error at runtime using gdb
and this stack
Do 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::DefineClass?
Thanks for your help!
The text was updated successfully, but these errors were encountered: