Bug 9936

Summary: #383649 Xaw's tooltips remove timers not belonging to them
Product: xorg Reporter: Brice Goglin <brice.goglin>
Component: Lib/XawAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.1 (2006.05)   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383649
Whiteboard:
i915 platform: i915 features:

Description Brice Goglin 2007-02-10 06:59:34 UTC
This bug has been reported to the Debian BTS 6 months ago by Bernhard R. Link. From what I see in gitweb, it still applies to current git.

Xaw's Tips.c registers and releases timers for tooltips to show,
but does not remember a timer already triggered. Thus it releases
timers no longer belonging to it but to other users of Xt Timeouts
within the same program. (This even happens very often, as Xt reuses
old TimeEventRecs, so the next one adding a timeout will get exactly
this number.)

diff -r -u libxaw-1.0.1.orig/src/Tip.c libxaw-1.0.1/src/Tip.c
--- libxaw-1.0.1.orig/src/Tip.c	2006-08-18 16:07:24.086733000 +0200
+++ libxaw-1.0.1/src/Tip.c	2006-08-18 16:08:02.513875540 +0200
@@ -564,6 +564,7 @@
     info->tip->tip.label = NULL;
     info->tip->tip.international = False;
     info->tip->tip.encoding = 0;
+    info->tip->tip.timer = 0;
     XtSetArg(args[0], XtNtip, &info->tip->tip.label);
     XtSetArg(args[1], XtNinternational, &info->tip->tip.international);
     XtSetArg(args[2], XtNencoding, &info->tip->tip.encoding);

This is the correct bahaviour, as section 7.1.3 of Intrinsic.txt.gz
says:

| Note that timeouts are automatically removed once they trig-
| ger.

src/Repeater.c correctly forgets the timer when it is triggered, but
src/StripChart.c does very strange things with Xt Timeouts, which
very likely will have similar problems.

Brice
Comment 1 Daniel Stone 2007-02-27 01:36:19 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Julien Cristau 2009-08-25 10:49:33 UTC
fixed in git.

commit b512bfc3fb5c489f4e1ef6529f7632bd70b9f461
Author: Bernhard R. Link <brlink@debian.org>
Date:   Fri Aug 18 16:29:10 2006 +0200

    Xaw's tooltips remove timers not belonging to them

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.