Re: XForms: Server crash

moini@eleceng.adelaide.edu.au
Thu, 21 May 1998 15:52:08 +0930 (CST)

# To subscribers of the xforms list from moini@eleceng.adelaide.edu.au :

> 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 actually put the fl_check_forms just to see if it solves the problem, as
I thought that I am putting to much pressure on the xerver, ..., this didn't
have any effect. In the code there are many objects being hidden and shown,
and changed size and color, ..., so maybe the server just cannot hack it.

> 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 will try this and see how it works.

> 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.

This is what I guess is causing the problem, although I havn't figured out
which function is really doing this, because everything hangs when this
happens.
>
> 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?

It is a totall hang. Only the mouse moves. The only way to get it out of
crash is to kill the server. Killing the program doesn't do any good.

I think I should get hold of an MIT X and free myself, in any case this is
definitly a server problem.

I forgot to say that every now and then (one out of 20) that the code goes
past this stage, it stuffs up the colors, and the form needs a refresh.

Thanks
Ali
>
> 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/
>
>

_________________________________________________
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/