XForms: Mysterious crashing bug is 0.88

Mike Blackwell (mkb@cs.cmu.edu)
Sat, 07 Feb 1998 17:39:50 -0500

# To subscribers of the xforms list from Mike Blackwell <mkb@cs.cmu.edu> :

We have a complex XForms based application that crashes very
consistantly under 0.88 (SGI Irix 5.3), but works fine in 0.86.
I've narrowed down the events that lead to the crash, but I've
been unsuccesful in creating a small demo program that also crashes.
I'm going to post what I know so far, in the hopes that it will
tickle some neurons somewhere...

The problem occurs on windows which have a single input object,
along with buttons, pixmaps, and inactive free objects. The form
is controlled through a small main loop that calls fl_check_forms()
along with some other status checking. Some of the pixmaps and free
objects are being updated (via fl_redraw_object()) either from the
main loop or via timeout callbacks which poll external devices.

The problem is: the first time you hit any key, if the cursor is not
in the input field, the program crashes. If the cursor is in the input
field, then the input gets the key event properly, and any subsequent
key events, no matter where in the window the cursor is, also
go to the input field, as expected.

Here's a stack dump of a crash:

Core from signal SIGBUS: Bus error
(dbx) where
> 0 do_keyboard(0x1006a0b0, 0x10012a74, 0x10012a60, 0x59d) ["forms.c":1438, 0x4a607c]
1 do_interaction_step(0x0, 0x10012a74, 0x10012a60, 0x59d) ["forms.c":1721, 0x4a6a50]
2 fl_treat_interaction_events(0x0, 0x10012a74, 0x10012a60, 0x59d) ["forms.c":1960, 0x4a73f8]
3 fl_check_forms(0x100a00e0, 0x10012a74, 0x10012a60, 0x59d) ["forms.c":1974, 0x4a7470]
4 tracking_main_loop(form = 0x1008f048, plan_file = 0x7ffe9ddc = "/usr0/mrdemo/patients/phantom_spheres.left/config/patient.plan", xform_file = 0x7fff03b8 = "/usr0/mrdemo/patients/phantom_spheres.left/intraop/Opto_CT.xform") ["/tmp_mnt/IUS/mrcas2/ios_p
5 main(argc = 1, argv = 0x7fff2ec4) ["/tmp_mnt/IUS/mrcas2/ios_project/src/ios.c":4045, 0x42be94]
6 __istart() ["crt1tinit.s":13, 0x41d0b0]

I've tried forcing the focus to the input object at various places
to work around this, with no luck.

Mike Blackwell

mkb@cs.cmu.edu
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/