[Brains-users] FW: Status of BRAINS XBadDrawable
Hans Johnson
hans-johnson at uiowa.edu
Tue Jun 28 15:21:26 PDT 2005
------ Forwarded Message
From: Kent Williams <norman-k-williams at uiowa.edu>
Date: Tue, 28 Jun 2005 17:11:50 -0500
To: Hans Johnson <hans-johnson at uiowa.edu>
Subject: Re: Status of BRAINS XBadDrawable
I think I killed this bug. At least, I have tried to make it happen
again for 10 minutes with no success.
The fix is essentially to completely drain XForms event queue before
returning from pv_process_gui_cmd. The problem was that 'b2 hide viewer
tracker' came down the pipe before all the X event handling for 'b2 show
viewer tracker' had completed.
The basic problem stems from the fact that X11 protocol messages are
buffered to some extent, and some messages require a round trip to the
server. This normally wouldn't be a problem, but when you've got a GUI
and a main thread on a multiprocessor, things get dicey. Apparently the
'hide viewer tracker' command was sneaking into Xforms' event queue
before Xforms had a chance to completely handle all the events spawned
as a result of the 'show viewer tracker' command.
This is a pretty crazy multiprocessor/multithread race condition thing,
and it happens because even though we've serialized (with pipes) the
XForms<->Tcl/Tk interaction, but we didn't considering the SECOND
multiprocess interaction, which is between the XForms thread and the X
Server.
Hans Johnson wrote:
>Kent,
>
>Have you made any progress on the BRAINS XBadDrawable problem?
>
>Hans
>
>
>
>
------ End of Forwarded Message
More information about the Brains-users
mailing list