Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6810b04255bb37e3397f2f7247f5ca8628c3cd7814217aa7199e0581145c69d7
Ticket: 8d8bb39962188ebc27f9276a43a6f6bc5269311e
incorrect notifier initialization in tclXtNotify.c
User & Date: anonymous on 2022-03-02 08:13:17
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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?
    
  5. foundin changed to: "8.6.12"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Severe"
  11. status changed to: "Open"
  12. submitter changed to: "anonymous"
  13. subsystem changed to: "05. XT Notifier"
  14. title changed to: "incorrect notifier initialization in tclXtNotify.c"
  15. type changed to: "Bug"