[New-bugs-announce] [issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets
report at bugs.python.org
Tue Aug 25 08:23:41 EDT 2020
New submission from Jonathan Lahav <j.lahav at gmail.com>:
After creating around 10000 widgets (verified with ttk.Label), no more widgets get created, and sometimes graphical artifacts appear outside the application window.
No error message or exception is raised.
Either the limit can be removed (having dynamically created 10000 widgets in data heavy applications is sometimes desired), or at least document and return runtime errors to prevent the weird behavior.
This is the problematic part:
for _ in range(10000):
A full minimal example code is attached, though a better effect can be seen when running the above two lines in the context of a more advanced Tkinter application.
nosy: gpolo, j.lahav, serhiy.storchaka
title: Tkinter - Unexpected behavior after creating around 10000 widgets
versions: Python 3.8
Added file: https://bugs.python.org/file49426/ten_k.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce