This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ronaldoussoren, ysnt27
Date 2019-11-05.21:05:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572987954.17.0.607782669591.issue38609@roundup.psfhosted.org>
In-reply-to
Content
The attached code creates a static (global) C++ object that owns a reference to a Python object, and releases that reference in its destructor. That destructor runs at program termination, which is after interpreter shutdown (that is after Py_FinalizeEx is called).  

After the call to Py_FinalizeEx() the interpreter no longer exists, and it is unsafe to call Python API functions (other than the ones listed as safe to call before a call to Py_Initialize).  Py_DECREF is not on that safe list.
History
Date User Action Args
2019-11-05 21:05:54ronaldoussorensetrecipients: + ronaldoussoren, ysnt27
2019-11-05 21:05:54ronaldoussorensetmessageid: <1572987954.17.0.607782669591.issue38609@roundup.psfhosted.org>
2019-11-05 21:05:54ronaldoussorenlinkissue38609 messages
2019-11-05 21:05:54ronaldoussorencreate