From: SourceForge.net <no...@so...> - 2006-03-21 17:59:18
|
Bugs item #1188340, was opened at 2005-04-22 18:05 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1188340&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 54. [console] Group: current: 8.5a3 Status: Open Resolution: Fixed Priority: 9 Submitted By: Don Porter (dgp) Assigned to: Don Porter (dgp) Summary: Tk_CreateConsoleWindow: mem leak potential Initial Comment: Each call to Tk_CreateConsoleWindow(interp) creates and initializes a new interp, and stores it in a per-thread variable. If this is called twice in one thread (for two interps, or even on the same interp twice), then the 2nd call overwrites the first without deleting -- memory leak. If one of those interps is deleted, the deletion cleanup leaves the remaining interp without a console interp to use. Per-thread data is the wrong solution here. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2006-03-21 12:59 Message: Logged In: YES user_id=80530 here's the backport patch for 8.4.13 ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2006-03-20 23:02 Message: Logged In: YES user_id=80530 attached patch is a collection of the last several commits to HEAD. these changes fix the lifetime issues of the data structures behind the [console] command/widget. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2006-03-16 12:39 Message: Logged In: YES user_id=80530 attached patch just committed to HEAD. does a significant rework of the data structures to establish cleaner alloc and dealloc pairings. Needs mucho testing before approval to backport for 8.4. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2006-03-14 12:15 Message: Logged In: YES user_id=80530 see 725941 for a better explanation about why console show package require Thread thread::create {puts foo} does not display "foo" in the console. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2005-12-01 12:01 Message: Logged In: YES user_id=80530 aku suggests that the auto-sharing of std channels by multiple threads may be a related bug/misfeature lurking here as well. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2005-12-01 11:52 Message: Logged In: YES user_id=80530 A related matter: console show package require Thread thread::create {puts foo} will not display "foo" in the console. The restriction is apparently in place to respect Tcl's apartment model for interps and threads. The most apparent way to resolve this would be to rework the console widget to live in its own thread, so all threads could send messages to it the same way to write to the console display. the difficulty with that plan is that it could make Tk depend on a thread-enabled Tcl and possibly the Thread package. Something to consider for Tcl 8.5? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2005-11-21 14:02 Message: Logged In: YES user_id=80530 hoping to fix this for 8.4.12 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1188340&group_id=12997 |