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 eryksun
Recipients Thrameos, WildCard65, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-12-20.05:38:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608442686.74.0.229255712517.issue42529@roundup.psfhosted.org>
In-reply-to
Content
I built JPype normally in release mode and was able to analyze the problem using the platform debugger (cdb or WinDbg). I think the issue is pretty straight forward. The static initializer for classMagic in "native\python\pyjp_class.cpp" is calling PyDict_New(). That's not kosher because the GIL isn't held during the LoadLibraryExW call. It seems to be okay without a cached PYC because the new_dict() call has an available dict on the freelist in this case. In the PYC case, new_dict() happens to instead call PyObject_GC_New, which fails with an access violation. I modified "pyjp_class.cpp" to set the static value of classMagic to NULL and moved the initialization to PyJPClass_new. This resolved the problem. So I think this issue should be closed as a third-party bug.
History
Date User Action Args
2020-12-20 05:38:06eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, WildCard65, Thrameos
2020-12-20 05:38:06eryksunsetmessageid: <1608442686.74.0.229255712517.issue42529@roundup.psfhosted.org>
2020-12-20 05:38:06eryksunlinkissue42529 messages
2020-12-20 05:38:06eryksuncreate