Re: XForms: Server crash

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 20 May 98 22:06:12 PDT

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

> One STRANGE thing that I noticed was the following behaviour
>
> ---------------- The piece of code --- [snipped] ----------------
> [...]
> ------------------ The Problem ------------------------------------
> Just notice the appearance of two x6 at the beginning and not x6 before
> the second x61.
> As you see the program seems to be running out of sync.

What kind of a routine is the piece of code in? Is it an idle
callback or some kind of event handler? It is possible that the code
is being reentered. When you call fl_check_forms() it's possible that
the function is again dispatchable because of either the idle timeout
period has expired (perhaps the granularity of the timer is too large)
or, in the case of an event handler, there are two events of the same
type queued for service (perhaps Expose events -- they sometimes come
in clusters -- some other events may also occur in bunches, for
instance, ConfigureNotify).

I have seen that kind of undesirable behavior before and my workaround
is to set a flag when I enter the routine and unset it before I leave:

void some_routine( ... )

{

static int been_here = 0;

if ( !been_here ) {

been_here = 1;

/* Do your stuff */
fl_check_forms();

been_here = 0;

}

}

If some_routine() is called recursively, then it just drops out the
bottom of the `if' statement and falls out the bottom.

I think The "Bad KeySym" messages are a red herring. I've seen them
as well in programs which work perfectly. I'm not sure at this moment
why they happen or if reporting this a bug or a feature.

As for the server hangs, all I can really do is speculate -- I used
to have occasional server crashes with XForms applications running
under X11R5 (not OpenYuck, though, it was real MIT X) and SunOS 4.1.4
but since I upgraded to R6 some time ago it's been steady as a rock --
if your routine is being called recursively a zillion times, it's
possible that you're throwing more at the server than it is capable of
handling. Admittedly this is pretty far fetched.

The other thing thing which occurs to me is that perhaps something's
doing a server grab and not letting go.

Can you describe the server hang in more detail? For instance, do you
have mousitude or does the server completely freeze? Does the server
eventually crash or core dump or does it just remain in that state
forever. Can you kill the process from a remote login and restore the
server to function? Can you even remotely log in?

spl

_________________________________________________
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://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/