tkinter window fails to appear approx 10% of the time on MacOS 12.3+
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Eseguire ripetutamente il riproduttore tkinter fornito su macOS 12.3.1 con Python 3.10.4 e tkinter 8.6.12, osservando se appare la finestra Toplevel. Analizzare l’interazione tra le chiamate alpha, withdraw, geometry, update_idletasks e mainloop; il lavoro è completato quando il comportamento intermittente della finestra mancante è stato riprodotto e spiegato e non si verifica più nell’ambiente indicato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug report
1 in 10 or 15 windows fails to appear when running tkinter on MacOS version 12.3+ and tkinter 8.6.12 using this simplified program:
import tkinter as tk
hmr = tk.Tk()
hmr.attributes('-alpha', 0)
hmr.withdraw()
root = tk.Toplevel(class_='toplevel')
root.attributes('-alpha', 0)
root.title('My Test Title')
frame = tk.Frame(root)
frame.pack(side=tk.TOP, anchor='nw', padx=0, pady=0, expand=False, fill=tk.NONE)
a = tk.Label(frame, text ="Hello World")
a.pack()
root.update_idletasks()
root.geometry("+600+600")
root.update_idletasks()
root.attributes('-alpha', 1)
root.mainloop()
Your environment
MacOS 12.3.1
Python 3.10.4
tkinter 8.6.12
Background
This problem was first reported to the PySimpleGUI project in mid-May. We've been working to find work-arounds and to narrow down the problem as much as possible. Because tkinter 8.6.11 isn't available pre-built on Python.org for 64 bit Macs, it's not been possible to test to see if 8.6.12 is the origin of the problem. While it is an intermittent problem, it's thankfully frequent enough to make duplication possible by running the program several times manually.
I assume it's an 8.6.12 problem as no one has reported the problem on 8.6.11 on any platform. Numerous MacOS users have been running into the problem.
The example code supplied is the most basic, shortest number of steps we've been able to create that perform the same operations that PySimpleGUI uses to build and move the window.
PySimpleGUI's default location for user windows is the center of the screen. So that users do not see the window "jump" from the starting location, the alpha channel is set to zero when the window is created and remains 0 while it's built and moved. Once moved into the final position, the Alpha channel is set to 1 and thus the window appears in the correct location without a visible jump.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Merge medio
- 1g 9h
- PR unite (30g)
- 558
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python/cpython
-
docs pending
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
stdlib type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
stdlib type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
build type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
stdlib topic-email type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Tutte le issue di python/cpython
Issue simili
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bancolombia/sentinel#23 ·
-
test md ApertaCI
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100