Open stonebig opened 5 months ago
maybe related to this still missing piece ? https://github.com/colesbury/nogil-3.12/commit/78825e0508
simply importing
from tkinter.filedialog import askopenfile
crashes 3.13t for me, which is imported in the sqlite_bro project. hope this helps narrow down the issue.
By the look of current early state of free-threading, we may assume the tkinter/free-threading is rather a 2025 question, with uncertain fate.
I tried to use WinDbg to debug it, and found:
+1 for this happening on Windows only, version 3.13.0 (non-beta, release day build). I see exactly the same error as @python-zhong when running python3.13t.exe -m tkinter
under WinDbg (no pytest involved). The tkinter test dialog launches and operates correctly when not in free-threading mode (GIL enabled) on the same machine. I tested the same command on a Debian platform (compiled the same 3.13.0 tag), and it worked flawlessly in free-threaded mode. Don't have a mac to test on, unfortunately.
Platform details:
Windows 10 22H2 build 19045.4894
py -3.13 -VV
--> Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)]
py -3.13t -VV
--> Python 3.13.0 experimental free-threading build (tags/v3.13.0:60403a5, Oct 7 2024, 09:53:29) [MSC v.1941 64 bit (AMD64)]
Linux [hostname] 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 GNU/Linux
./python -VV
--> Python 3.13.0 experimental free-threading build (tags/v3.13.0:60403a5409, Oct 8 2024, 23:03:36) [GCC 10.2.1 20210110]
@zooba The official Windows installer (with free-threading binaries) only includes a Python313\DLLs\_tkinter.pyd
. There's no _tkinter.cp313t-win_amd64
, so importing tkinter
in py -3.13t
crashes as it tries to load an incompatible extension.
Do you know why that's happening?
As noted in https://github.com/python/cpython/issues/125179#issuecomment-2402681892, I have run tkinter and IDLE on debug + free-threading builds since last March. But I never tried the installers. Of course, PCbuild/amd64 has a full set of _xyz_d.cp314t-win_amd64.ext files. I'm sorry I did not notice this issue before.
Yep, figured out the free-threading build on the same Windows box (sorry about the delay, Visual Studio noob), and when compiled locally tkinter
operates flawlessly on free-threading.
Admittedly, I've just compiled Cpython for the first time yesterday -- but, if this is simple to fix, I'd be happy to submit a PR for it if that would help?
Crash report
What happened?
doing pytest on my github repository "sqlite-bro" , with Python-3.13.0b1 augmented per:
I get a crash
on 3.13.0b1 patched the same but not Free-threading all seems ok
I did that test because IDLE doesn't want to start and doesn't say why. Package set used:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Output from running 'python -VV' on the command line:
Python 3.13.0b1 (tags/v3.13.0b1:2268289, May 8 2024, 12:31:50) [MSC v.1938 64 bit (AMD64)]