[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav


Jonathan Lahav  added the comment:

Thank you for checking it so quickly, and answering nicely.

I indeed forgot to mention that it happened to me on Windows. Sorry for that.

The issue seems similar to the one you linked. I will try and take this to the 
TCL community since it impacts our product. Thank you for translating the code 
to TCL.

If the python community has no interest in trying to push TCL to fix it, this 
issue can be closed.

Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread E. Paine


E. Paine  added the comment:

I am struggling to reproduce. On Linux the window shows exactly as expected (it 
does take a while to close, though, which is understandable) and on Windows the 
window never shows (it gets stuck before the mainloop). This is, however, not a 
tkinter problem as I get exactly the same result on each platform running the 
following equivalent Tcl in Wish:

for {set i 0} {$i < 1} {incr i} {
ttk::label ".l$i" -text problematic
}
grid [ttk::label .lb -text {now you see me}]

A similar issue was reported in #37673. If you *need* lots of widgets (e.g. a 
large table) I would suggest lazy loading them instead of trying to render them 
all at load. Thank you for reporting this issue but it should be closed as 
third-party.

A note for future: please could you include information about your environment 
(Python version, Tk patchlevel, OS, etc.) so it is easier for the problem to be 
narrowed down (again, thank you for reporting this issue).

--
nosy: +epaine
Added file: https://bugs.python.org/file49427/ten_k.tcl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav


New submission from Jonathan Lahav :

Observation:
After creating around 1 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.

Expected:
Either the limit can be removed (having dynamically created 1 widgets in 
data heavy applications is sometimes desired), or at least document and return 
runtime errors to prevent the weird behavior.

Reproduction:
This is the problematic part:
for _ in range(1):
ttk.Label(root, text='problematic')

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.

--
components: Tkinter
files: ten_k.py
messages: 375888
nosy: gpolo, j.lahav, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Tkinter - Unexpected behavior after creating around 1 widgets
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file49426/ten_k.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com