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 trying to hide the titlebar of a Toplevel window while the main window's titlebar is also hidden, Python itself crashes without showing an exception. Here's a minimal, reproducible example:
importtkinterastk, hPyTfromtkinterimportttkwindow=tk.Tk()
hPyT.title_bar.hide(window)
defopen_toplevel():
toplevel=tk.Toplevel()
hPyT.title_bar.hide(toplevel)
ttk.Label(toplevel, text="I'm not even displaying").place(relx=0.5, rely=0.5, anchor="center")
ttk.Button(window, text="Open Toplevel", command=open_toplevel).place(relx=0.5, rely=0.5, anchor="center")
window.mainloop()
When I click on the "Open Toplevel" button, the Toplevel opens, but the app freezes for a few seconds, then it crashes without any exception.
In the Event Viewer, I only get some vague messages about Python crashing, but they don't really explain what made it to crash:
Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Python because of this error.
Program: Python
File:
The error value is listed in the Additional Data section.
User Action
1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
2. If the file still cannot be accessed and
- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.
- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.
4. If the problem persists, restore the file from a backup copy.
5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.
Additional Data
Error value: 0x0
Disk type: 0x0
When trying to hide the titlebar of a Toplevel window while the main window's titlebar is also hidden, Python itself crashes without showing an exception. Here's a minimal, reproducible example:
When I click on the "Open Toplevel" button, the Toplevel opens, but the app freezes for a few seconds, then it crashes without any exception.
In the Event Viewer, I only get some vague messages about Python crashing, but they don't really explain what made it to crash:
If I comment out either the
hPyT.title_bar.hide(window)orhPyT.title_bar.hide(toplevel)line, the Toplevel window opens just fine.Here's a screen recording of what's happening:
Screen.Recording.2025-07-27.205441.mp4
I can reproduce this bug on both Windows 10 and 11, but not on Windows 8.1 and 7 (using the same code).
Here are more screen recordings from Windows 10, 8.1, and 7:
Windows 10:
Screen.Recording.2025-07-27.214202.mp4
Windows 8.1:
Screen.Recording.2025-07-27.214538.mp4
Windows 7:
Screen.Recording.2025-07-27.214801.mp4