Native code crashing
See original GitHub issueBug Description:
I recently upgraded to node-usb 2.5.*, and I started noticing that the native code was crashing my program when plugging in or unplugging hardware. I was able to debug it with VS and found it hit a call stack inside of PNP (plug and play) in native code.
Steps to Reproduce:
- Create a program where
usb.on("attach")
andusb.on("detach")
is used. - Run the program and disconnect or connect a board.
- Notice the failure.
Additional info:
I downgraded to 2.4.3 and the issue went away.
Exception:
Call stack:
Additional Information
- Operating System: Windows 10
- Runtime (
node -v
orelectron -v
): 16.13.1, node. - Node USB Version (
npm ls usb
): 2.5.1
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Diagnosing Native Crashes | Android Open Source Project
The following sections include common types of native crash, an analysis of a sample crash dump, and a discussion of tombstones.
Read more >5 Troubleshoot System Crashes - Java
In some cases a bug in a native library manifests itself as a crash in Java VM code. Consider the crash in the...
Read more >Effects of Fatal Error - crash happened in native code
A fatal error has been detected by Java Runtime Environment. The crash happened outside the java virtual machine in native code. java ·...
Read more >Unity Crashed!!Got a UNKNOWN while executing native code
Open Project -> crash. I am new to Unity, and cannot get started... Log: "Got a UNKNOWN while executing native code. This usually...
Read more >Debugging Native Crashes in Android Apps | by Jackson Cheek
TL;DR — Native Crash Debugging Steps · Check for the bug on multiple device architecture types. · Decompile the . · Check that...
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
No, not something I’ve seen there, but the code here was written differently and with a newer api.
I have a theory, with a hopeful fix #541
https://gist.github.com/yooouuri/5140bd9c806a98952aed455aa383f130 A crash report.
Im getting a
In my error handling service (Sentry)
Using node-usb 2.5.0