XForms: fl_add_timeout() bug

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 25 Sep 97 10:21:34 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

I believe I've unearthed a bug in the timeout callback logic.

If the callback function calls fl_check_forms() (or, probably,
fl_do_forms()), the timeout callback is called recursively. Removing
the timeout id manually upon entry to the timeout callback function
causes an error message of the form

In RemoveTimeout [timeout.c 69] ID 1 not found

to occur and a core dump in fl_handle_timeouts() as shown here:

(xxgdb) info stack
#0 fl_handle_timeouts () at timeout.c:92
#1 0x464dc0 in fl_handle_automatic () at forms.c:1572
#2 0x4651d0 in do_interaction_step () at forms.c:1703
#3 0x465bb4 in fl_treat_interaction_events () at forms.c:1955
#4 0x465cc4 in fl_do_forms () at forms.c:1986
#5 0x43cff0 in do_forms (context_ptr=0x1001df80) at xvoxtrace.c:296
#6 0x43bc60 in main (argc=2, argv=0x7fffaf04) at xvoxtrace.c:51

XForms version 0.87.2, X11R6, IRIX 5.2, SGI Onyx RE^2.

Hacking around the recursion causes a similar error to occur.

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/