From: <no...@tc...> - 2024-09-29 09:18:57
|
Automated mail by fx, on behalf of no...@tc... Ticket Change [2db5c7da6ec351c6547a06a94a9046ca39ecc11050e18794f1a1601b4557d646] ["grid info" with half-dead argument can cause hangup or even crash] By fvogel For Tk On 2024-09-29T09:08:14.031 Details https://core.tcl-lang.org/tk/tinfo?name=2db5c7da6ec351c6547a06a94a9046ca39ecc11050e18794f1a1601b4557d646 Ticket https://core.tcl-lang.org/tk/tktview/eb332846f3e6965d0b11303af60c7c3e8dbd0eda Changed Fields icomment: Another patch could have been: <verbatim> Index: generic/tkEvent.c ================================================================== --- generic/tkEvent.c +++ generic/tkEvent.c @@ -1286,11 +1286,11 @@ * handle CreateNotify events, so we gotta pass 'em through. */ if ((ip.winPtr != NULL) && ((mask != SubstructureNotifyMask) - || (eventPtr->type == CreateNotify))) { + || (eventPtr->type == CreateNotify)) && !(winPtr->flags & TK_ALREADY_DEAD)) { TkBindEventProc(winPtr, eventPtr); } } tsdPtr->pendingPtr = ip.nextPtr; </verbatim> but this would completely prevent the bind mechanism to be called for dead windows (windows in the process of being deleted), but this would change the behavior drastically, as confirmed by new errors in the (bind and event) test suite. I'm afraid I'll have to sprinkle tests on the TK_ALREADY_DEAD flag at quite many places, but this is more or less already what we have in the code. login: fvogel ------------------------------------------------------------ See Tcl/Tk development @ http://core.tcl-lang.org/ ------------------------------------------------------------ |