-
Notifications
You must be signed in to change notification settings - Fork 748
Crash on shutdown when embedding Python in C# #1831
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
Comments
Is the |
It is the culprit. I'm unsure if it is totally advisable; PR incoming; grabbing the GIL only when embedded. |
Just adding to this: we are seeing a similar segmentation fault while shutting down, only while debugging for same reason. Manually shutting down seems to avoid the seg fault QuantConnect/Lean#6439 |
Environment
Details
Using the Python for Unity package with at a commit hash later or equal to the one above, pythonnet causes a crash on Shutdown. I've traced the issue to this PR: #1780 which is cause by checking a Python internal without holding the GIL; which the shutdown process isn't doing (or at least not at this point).
The text was updated successfully, but these errors were encountered: