Artifacts Associated With Ticket 8d8bb39962188ebc
Ticket change [6810b04255] (rid 198612) by anonymous on 2022-03-02 08:13:17:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I need to replace the Tcl notifier, so I had a look at unix/tclXtNotify.c. After "make xttest" and running xttest on a small test script, I noticed the program doesn't end. gdb tells me the program is stuck in Tcl_FinalizeNotifier. I see in unix/tclUnixNotfy.c that Tcl_FinalizeNotifier checks whether tclNotifierHooks.finalizeNotifierProc is set. If so, run that function. Otherwise, run provided cleanup code. Now tclXtNotify.c sets all 8 members of the struct Tcl_NotifierProcs with Tcl_SetNotifier in function InitNotifier(), 4 with custom replacements, and 4 with default Tcl functions, including Tcl_FinalizeNotifier for the finalizeNotifierProc member. On exit, tclNotifierHooks.finalizeNotifierProc is called, so Tcl_FinalizeNotifier is called, and enters an infinite loop. The documentation at http://tmml.sourceforge.net/doc/tcl/Notifier.html seems to imply that all members of the struct Tcl_NotifierProcs need to be replaced with Tcl_SetNotifier. Is this a wrong assumption?
- foundin initialized to: "8.6.12"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Severe"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "05. XT Notifier"
- title initialized to: "incorrect notifier initialization in tclXtNotify.c"
- type initialized to: "Bug"
Ticket change [a841c8b834] (rid 198613) by anonymous on 2022-03-02 12:43:26:
- icomment:
interestingly, found very similar code based on the Xt notifier in tclplugin-3.0.0.1/unix/npxtnotify.c from the Tcl/Tk Browser Plugin (see http://www.tcl.tk/software/plugin/ and http://tclplugin.sourceforge.net/). With one difference: here, the struct passed to Tcl_SetNotify has only 4 of the 8 fields set.
- login: "anonymous"
- mimetype: "text/plain"
- icomment:
Ticket change [4faed22e79] (rid 198704) by jan.nijtmans on 2022-03-04 16:16:55:
- closedate changed to: "2459643.17842125"
- closer changed to: "jan.nijtmans"
- icomment:
Indeed! Thanks for the report. Also the memset() function was called much too late ..... Fixed now [362f6d184c8de451|here]
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"