question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Callback related crash?

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
bn3tcommented, Nov 19, 2018

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.

0reactions
woubuccommented, Nov 18, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found