tkinter window fails to appear approx 10% of the time on MacOS 12.3+
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Führen Sie den bereitgestellten tkinter-Reproducer wiederholt unter macOS 12.3.1 mit Python 3.10.4 und tkinter 8.6.12 aus und beobachten Sie, ob das Toplevel-Fenster erscheint. Untersuchen Sie das Zusammenspiel der Aufrufe alpha, withdraw, geometry, update_idletasks und mainloop; abgeschlossen ist die Aufgabe, wenn das intermittierende Verhalten des fehlenden Fensters reproduziert und erklärt wurde und unter der gemeldeten Umgebung nicht mehr auftritt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 558
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python/cpython
-
docs pending
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
stdlib type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
stdlib type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
build type-bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
stdlib topic-email type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
zostera/django-bootstrap4#894 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
use-agent-os/agent-os#3276 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
NousResearch/hermes-agent#117848 ·