From: SourceForge.net <no...@so...> - 2003-05-27 15:42:07
|
Bugs item #741179, was opened at 2003-05-21 15:12 Message generated for change (Settings changed) made by vincentdarley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=741179&group_id=12997 Category: 18. [text] Group: 8.5a0 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Vince Darley (vincentdarley) Summary: text-15.* fails to clear font Initial Comment: $ make test TESTFLAGS="-file text.test -match text-15.*" TCL_LIBRARY=/local/src/tcl/library; export TCL_LIBRARY; \ TK_LIBRARY=/local/src/tk/library; export TK_LIBRARY; \ ./tktest /local/src/tk/unix/../tests/all.tcl -geometry +0+0 \ -file text.test -match text-15.* Tests running in interp: /local/src/tk/solaris/tktest Tests located in: /local/src/tk/tests Tests running in: /local/src/tk/solaris Temporary files stored in /local/src/tk/solaris Test files sourced into current interpreter Running tests that match: text-15.* Skipping test files that match: l.*.test Only running test files that match: text.test Tests began at Wed May 21 11:11:07 AM EDT 2003 text.test Tests ended at Wed May 21 11:11:08 AM EDT 2003 all.tcl: Total 358 Passed 2 Skipped 356 Failed 0 Sourced 2 Test Files. Font Courier -12 still in cache. Note the final line. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-05-22 15:58 Message: Logged In: YES user_id=80530 That patch does make the "still in cache" message go away, yes. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-05-21 23:31 Message: Logged In: YES user_id=32170 Yup, one unfortunate side-effect of the new option- freeing code (Obj-based) is that it actually requires a tkwin to operate on. The old stuff didn't necessarily, and it is these changes that are causing this problem, in conjunction with a design which overloaded 'textPtr- >tkwin == NULL' as meaning the widget was being deleted. Anyway, please try the attached patch. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-05-21 20:16 Message: Logged In: YES user_id=80530 Yes, bugginess in widget destruction is what I'd expect. Several Tk widgets have been through similar troubles. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-05-21 19:09 Message: Logged In: YES user_id=32170 I imagine the problem is in lines 1346 onwards of tkText.c where the widget is destroyed. If the tkwin structure is already null'd out, then the config options will not be freed (and therefore the font will not be freed). It looks as if this can happen when called from TextCmdDeletedProc, i.e. if the widget command is deleted rather than the window being destroyed. Therefore removing 'textPtr->tkwin = NULL' from TextCmdDeletedProc ought to fix this problem, but may well create other problems, particularly around double- deletion of the widget. Unfortunately, I can't seem to reproduce the problem on Windows, so am having a hard time looking into it. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-05-21 16:52 Message: Logged In: YES user_id=80530 when I revert to the Tk HEAD of 2003-05-17, the problem goes away. The message comes from TkFontPkgFree in tkFont.c. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-05-21 16:18 Message: Logged In: YES user_id=32170 Do you know if this bug was in the old text widget? Also can you tell me where that 'still in cache' message comes from.... cheers, Vince. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2003-05-21 15:22 Message: Logged In: YES user_id=79902 I've not touched that bit at all... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=741179&group_id=12997 |