Skip to content
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

Unhandled C++ Exception / 0x7ff8f8034fd9 #487

Open
hrueger opened this issue Sep 29, 2022 · 3 comments
Open

Unhandled C++ Exception / 0x7ff8f8034fd9 #487

hrueger opened this issue Sep 29, 2022 · 3 comments

Comments

@hrueger
Copy link
Contributor

hrueger commented Sep 29, 2022

Hi,
I just got this crash report in Sentry, and since hidapi has a function called hid_get_feature_report, the error probably comes from this lib?
https://sentry.internal.makepro-x.com/share/issue/aa0b31f57375418ea238679cb0f2ecb8/
My application is quite complex, that means I unfortunately don't have any code available to easily reproduce this...

Does the stack trace give you any hint what the problem could be?

Edit: Sentry tells me that it is missing the debug file for the module, but as they are not bundled with the prebuilds, I don't know where to get it from.

@todbot
Copy link
Contributor

todbot commented Sep 29, 2022

Hi @hrueger,

Unfortunately that stack trace isn't very helpful. The hid_get_feature_report() is actually from hidapi, of which node-hid is a thin wrapper on. But the problem I would say lies in the Node realm, not hidapi's fault.

What version of node-hid is this app running? The first step would be to get it at the most recent version.

I think I've seen this type of error when node-hid is used in a multi-threaded way and care isn't exercised when accessing a opened device in a separate thread. Since hidapi isn't thread-safe in general, node-hid doesn't attempt to be either. Please ensure all accesses to HID devices are in the same thread, and don't try to share devices across the Electron main/renderer process divide.

@Julusian
Copy link
Contributor

Yeah that stack trace looks very wrong, we are barely anything async, and definitely are not doing anything inside of AfterThreadPoolWork. Either that stack trace is badly mangled, or could that be something around when a worker thread is being destroyed?

@hrueger
Copy link
Contributor Author

hrueger commented Sep 29, 2022

Thanks for the fast responses.

What version of node-hid is this app running?
I'm using version 2.1.0.

I'm not using node-hid in a worker thread. It's only in the electron-main tread. I'm using it indirectly, the "parent" lib is @elgato-stream-deck/node.

The application itself uses a worker_thread, though, but I'm not loading @elgato-stream-deck/node nor node-hid there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants