# To subscribers of the xforms list from Trent Piepho <xyzzy@speakeasy.org> :
I'm using xforms 0.88.1 on a glibc2.1 linux system. The following test
program will cause a crash inside xforms.
#include <forms.h>
int main(int argc, char *argv[])
{
Window bar;
fl_initialize(&argc, argv, 0, 0, 0);
bar = fl_winopen("bar");
for(;;) fl_do_forms();
}
You need to take the window that appears and move it around a bit to get the
crash. Clicking a mouse button repeatedly, or holding down a key, in the
window seems to work too. It seems like generating a bunch of events is all
that is necessary.
This is the backtrace from gdb:
#0 0x40245d78 in main_arena ()
#1 0x401a17a2 in buffered_vfprintf (s=0x40245ce0, format=0x400809f4 "%s%s\n",
args=0xbffff928) at vfprintf.c:1767
#2 0x4019c986 in _IO_vfprintf (s=0x40245ce0, format=0x400809f4 "%s%s\n",
ap=0xbffff928) at vfprintf.c:1029
#3 0x401a5047 in fprintf (stream=0x40245ce0, format=0x400809f4 "%s%s\n")
at fprintf.c:32
#4 0x40075a74 in P_errmsg ()
#5 0x40038c48 in fl_XPutBackEvent ()
#6 0x400466b8 in get_next_event ()
#7 0x400455f3 in do_interaction_step ()
#8 0x40045ee2 in fl_treat_interaction_events ()
#9 0x40045f4c in fl_do_forms ()
#10 0x8048695 in main (argc=1, argv=0xbffffaa4) at foo_main.c:11
#11 0x4016f9cb in __libc_start_main (main=0x8048660 <main>, argc=1,
argv=0xbffffaa4, init=0x80484fc <_init>, fini=0x80486dc <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffa9c)
at ../sysdeps/generic/libc-start.c:92
It appears that the fprintf is trying to print the string:
"In PutBackEvent [events.c 318] Q overflow"
I have a real program with forms, callbacks, etc. that exhibits the same
problem. The test program was just the simplest case which would give the
same error. I suspect that it might be related to the client receiving
XEvents that xforms doesn't care about, and instead of discarding them, they
pile up in a queue.
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Mon Sep 25 2000 - 10:27:51 EDT