Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-14
10:39 • Ticket [0d1a98ce9d] Custom notifiers (Xt) broken on 9.1: timers never fire s... artifact: f446c72d80 user: serhiy.storchaka
10:37 • Closed ticket [0d1a98ce9d]. artifact: 1a1334e73c user: jan.nijtmans
10:28
Fix [0d1a98ce9d]: Xt Notifier check-in: 2bbaf69eee user: jan.nijtmans tags: core-9-0-branch
09:37
Fix [0d1a98ce9d]: Xt Notifier check-in: de395db403 user: jan.nijtmans tags: trunk, main
08:54 • Ticket [0d1a98ce9d] Custom notifiers (Xt) broken on 9.1: timers never fire s... artifact: 70e37acd08 user: serhiy.storchaka
08:52
Fix [0d1a98ce9d]: the Xt notifier did not build and timers never fired with a custom notifier. Tcl_S... closed check-in: 0bafc1e13c user: serhiy.storchaka tags: xt-notifier
2026-05-22
17:36 • Ticket [0d1a98ce9d] Xt notifier broken on 9 status still Open with 3 other c... artifact: 2206e70fce user: emiliano
17:33 • Add attachment xttests.diff to ticket [0d1a98ce9d] artifact: e5b4799d34 user: emiliano
17:32 • Ticket [0d1a98ce9d] Xt notifier broken on 9 status still Open with 3 other c... artifact: d2e5d5dbe5 user: emiliano
17:32 • Add attachment xtnofity.diff to ticket [0d1a98ce9d] artifact: e39942f356 user: emiliano
17:31 • New ticket [0d1a98ce9d] Xt notifier broken on 9. artifact: 97c81d7887 user: emiliano

Custom notifiers (Xt) broken on 9.1: timers never fire

Closed / Fixed0d1a98ce9d8f8eb7cbb2ce09f92ec4289f8aba29Created 194 days agoUpdated 50 days ago
Descriptionmarkdown2026-05-22 17:31:43

The Xt notifier (unix/tclXtNotify.c) doesn't build on trunk due to a small typo here.

However, after fixing this bug and a few warnings and building xttest, trying to run the following script (derived from the ones in tests/winNotify.test) hangs

  set x 0
  after 1000 {
    incr x
    testeventloop done
  }
  testeventloop wait
  set x

On 8.6 this works as expected but on trunk it never returns from [testeventloop wait].

OS: linux x86_64.

Referenced by3
  • 2bbaf69eeeFix [0d1a98ce9d]: Xt Notifier check-in2026-10-14 10:28:13
  • de395db403Fix [0d1a98ce9d]: Xt Notifier check-in2026-10-14 09:37:13
  • 0bafc1e13cFix [0d1a98ce9d]: the Xt notifier did not build and timers never fired with a custom notifier. Tcl_SetMaxBlockTime() and Tcl_ServiceAll() called TclpSetTimer() directly since the long long conversion in [def988e9cd], bypassing the setTimerProc hook installed by Tcl_SetNotifier(); call Tcl_SetTimer2() instead. tclXtNotify.c, tclXtTest.c and unixNotfy.test fixes by emiliano. check-in2026-10-14 08:52:48
emilianoplain2026-05-22 17:32:52
Attached a fix for building xttest
emilianomarkdown2026-05-22 17:36:40

Attached the adapted Windows tests. Currently the only way to run them is by hand

$ ./xttest ../tests/unixNotify.test
serhiy.storchakawiki2026-10-14 08:54:58

The hang is a 9.1 regression from def988e9cd: Tcl_SetMaxBlockTime() and Tcl_ServiceAll() now call the internal TclpSetTimer() instead of Tcl_SetTimer(), bypassing the setTimerProc hook installed by Tcl_SetNotifier(). The timer of a custom notifier is never set, so this affects any custom notifier, not only Xt. 8.6 and 9.0 are not affected.

Proposed fix in branch xt-notifier: call Tcl_SetTimer2() there, plus your tclXtNotify.c, tclXtTest.c and unixNotfy.test patches. With it your script returns 1 and xttest unixNotfy.test passes.

jan.nijtmanswiki2026-10-14 10:37:04

Fixed in [trunk]. Build problem also backported to 9.0

Many thanks!

serhiy.storchaka Ticket [0d1a98ce9d]: 2 changes [History diff]2026-10-14 10:39:11
Log in (anonymous is fine) to add a comment.

Attachments: