Message374608
Thanks Steve for your explanation. I had a quick experiment with the ENTER_PYTHON definition and initially just added a call to PyThreadState_Get if the tstate was NULL. This still crashed the interpreter with the following error (which I think reaffirms Steve's explanation):
Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
To work-around this error, I temporarily acquired the GIL and then released it after the call to PyThreadState_Get. The result worked correctly and can be found in the attached diff. I am not saying that the attached diff is the solution, but I don't think we need to stop using tstate in favour of the gstate introduced in the PR.
> I could not reproduce the crash without showing any non-tk dialog.
That would help explain why I cannot reproduce it on Linux - it is differences in the windowing API under Tcl not some platform-specific code in Tcl/Tk or _tkinter. |
|
Date |
User |
Action |
Args |
2020-07-30 09:56:02 | epaine | set | recipients:
+ epaine, paul.moore, tim.golden, zach.ware, serhiy.storchaka, steve.dower, speleo3 |
2020-07-30 09:56:02 | epaine | set | messageid: <1596102962.59.0.393420424359.issue40075@roundup.psfhosted.org> |
2020-07-30 09:56:02 | epaine | link | issue40075 messages |
2020-07-30 09:56:02 | epaine | create | |
|