Artifacts Associated With Ticket 3461049fffffffff
Ticket change [f25189e696] (rid 109517) by tombert on 2011-12-16 17:47:10:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Environment: Win7 32bit, Xp 32bit, Tcl 8.5.11 MinGw build and ActiveState; Running the code below should draw 200 toplevels with each 50 entries. It stops to draw after toplevel 192 and entry 30 without an error message. When other resources are allocated (e.g. threads) it even stops earlier ... but no error message. I also experienced that the last entry is drawn outside the toplevel (but not reproducable). When running with the thread2.7b1 I also can reproduce crashes on exit (reported a separate tracker). I know its weird to produce 10tsd entries but I'am having crashes using the threading package in my application and this is the code that somehow resembles my problems. Now I'am woried that in my application there are other resources running low without notifying me. proc entries {} { for {set top 1} {$top <= 200} {incr top} { set w [toplevel .top$top] for {set entry 1} {$entry <= 50} {incr entry} { set e [entry $w.e$entry] $e insert end ${top}.${entry} pack $e -fill x -expand yes update idletask } update } puts "." puts "finished" } I'am not totally sure in which category this to put: memory, tk? thx - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "tombert"
- subsystem initialized to: "41. Memory Allocation"
- title initialized to: "Tk stops to draw entries (200*50)"
- type initialized to: "Bug"
Ticket change [25e270db7e] (rid 88241) by tombert on 2011-12-17 01:08:23:
- icomment:
I opened a separate tracker for the thread "crash" here: https://sourceforge.net/tracker/?func=detail&aid=3461051&group_id=10894&atid=110894
- login: "tombert"
- mimetype: "text/plain"
- username: "tombert"
- icomment:
Ticket change [4de8f2e1df] (rid 127138) by tombert on 2011-12-17 18:50:54:
- icomment:
With the following workflow I'am able to reduce the number of entries on each run: Run the "entries" procedure so that you end up with one toplevel that does stop drawing entries (on my computer this is 192.36). Then run the code below, which is similar to the one above. While the code is running (see the puts in the console) delete the last window (192) by clicking with the mouse on the X. The next window that opens up has one entry less then the one before (so in my case ???.35) set ::alltop 201 set ::stoptop 200 proc te {} { for {set top $::alltop} {$top < ($::alltop + $::stoptop)} {incr top} { set w [toplevel .top$top] for {set entry 1} {$entry <= 50} {incr entry} { puts ${top}.${entry} set e [entry $w.e$entry] $e insert end ${top}.${entry} pack $e -fill x -expand yes update idletask } update } set ::alltop $top set ::stoptop 200 puts "." puts "finished" } Also I experienced weird things that opening/closing files, sockets etc sometimes reduces the number of entries even more (unfort. not reproducable). Note: The handles, threads, GID in the windows task-manager is still very low. thx - login: "tombert"
- mimetype: "text/plain"
- username: "tombert"
- icomment:
Ticket change [d4ab5b9bb4] (rid 257768) by serhiy.storchaka on 2026-10-12 17:31:50:
- icomment:
Duplicate of Tk ticket [https://core.tcl-lang.org/tk/tktview/742773ffff|742773], see also [https://core.tcl-lang.org/tk/tktview/31085d2747|31085d2747]. Every mapped Tk widget uses one window handle on Windows, and a process is limited to 10000 USER handles by default (<tt>USERProcessHandleQuota</tt> in the registry); 192 toplevels with 50 entries each is about that many. Tk does not check whether <code>CreateWindowEx()</code> succeeded, so after the quota is exhausted it continues with NULL window handles. Nothing is drawn and no error is reported, and drawing on a NULL handle can go to the whole screen, which explains the entry drawn outside the toplevel.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- icomment:
Ticket change [a749098fcc] (rid 259891) by serhiy.storchaka on 2026-10-22 17:19:24:
- closedate changed to: "2461326.2304457175"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"