Callback related crash?
See original GitHub issueI’m attempting to port an app from node-ffi to node-ffi-napi, and it appears to be a little crashy. I’ve isolated and reproduced a crash which seems to be related to callbacks. A small repro can be found here https://gist.github.com/repl-chris/8bc15d8ba1a8e9a88a93f7c791a1fa46 - it crashes within a few seconds using node-ffi-napi, and runs perfectly fine using node-ffi…I’ve reproduced it on windows 10 and windows server 2008 using node 8.9. I was thinking perhaps the callback was getting GC’d but even keeping a reference to it on global
does not help. If I’m doing something wrong to cause this crash please let me know.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Why does C-callback function crashes my app?
I have Swift based project that uses a (third party) C-based library. I can use all the code from the library without any...
Read more >Writing a Bug Check Reason Callback Routine - Microsoft Learn
The main purpose of a KbCallbackDumpIo routine is to allow system crash dump data to be written to devices other than the disk....
Read more >Why does my app crash instead of passing error from callback
I'm learning node.js and I'm looking for errors in my code that causes it to crash ...
Read more >Add a Callback for App Crashes (setCrashCallback) - Aternity
For example, use setCrashCallback to run a callback function which adds an entry to your app's log to save information used when reopening...
Read more >Crashpad callback on app crash to inform user - Google Groups
Maybe through a callback in c++ or may the crash_handler.exe could call some other custom app in a crash situation. Best regards. Sven....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
IMHO this is bug because node-ffi supports it and it’s doc is correct. For my project, I had to revert to node-ffi made compatible with node10 using this branch.
So is this a bug and should we be able to use callbacks in threads, or is the documentation incorrect? @addaleax perhaps you can shed some light on this?