You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using error_already_set() in code that is called from a C++ program, the error_scope constructor crashes due to non-existent thread state. The C++ Code acquires the thread state through PyGILState_Ensure(), when throwing the error_already_set() PyGILState_Release() is called during thread exit.
It seems to me that when the destructor is called, the crash occurs because the current thread does not hold the GIL.