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

Fixed crash on new Chromium context #678

Conversation

diefbell-grabcad
Copy link

@diefbell-grabcad diefbell-grabcad commented Nov 20, 2024

Attempts to address: #663

It persists the default ZMQ Context across Chromium contexts.

I barely understand this stuff, so this may be completely wrong. Also some of the tests fail for worker pools. Not sure if that's my dev environment or an actual issue I've caused 🤷

Draft PR because, like I said, no idea if this is "correct" and should actually be merged yet..

@diefbell-grabcad
Copy link
Author

According to the Node documentation for context-aware addons:

Since the addon may be loaded multiple times, potentially even from different threads, any global static data stored in the addon must be properly protected, and must not contain any persistent references to JavaScript objects. The reason for this is that JavaScript objects are only valid in one context, and will likely cause a crash when accessed from the wrong context or from a different thread than the one on which they were created.

This could explain why the worker threads tests are failing. So I'll close this and take another crack at it.

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

Successfully merging this pull request may close these issues.

1 participant