[R] Rcmdr X11 protocol error message

Michael Bibo mbibo at qldnet.com.au
Tue Aug 31 06:56:20 CEST 2004


John Fox <jfox <at> mcmaster.ca> writes:

> 
> Dear Peter and Michael,
> 
> Peter: Thank you for fielding this question. Michael initially contacted me
> directly, and I suggested that he write to the list since I didn't know the
> possible source of the problem, had never seen it (either under Windows or
> Linux), and never had a report of it before.
> 
> Michael: Does this problem occur only with certain Rcmdr dialogs or
> generally? 
> 
> I'd also be curious to learn whether anyone else has experienced this
> problem, and whether anyone has run the Rcmdr package under Mandrake Linux
> without a problem.
> 
> Regards,
>  John
> 
Might the following offer a clue?

Extract from FAQ for SJava (http://www.omegahat.org/RSJava/FAQ.html)

Event Loops

# When I run the X11() graphics device and a Java GUI, sometimes I get errors
like the following

Xlib: unexpected async reply (sequence 0x1356)!

1: X11 protocol error: BadDrawable (invalid Pixmap or Window parameter) 
2: X11 protocol error: BadDrawable (invalid Pixmap or Window parameter) 

What's happening?
    Both Java and R are reading events from the X11 event loop ``at the same
time''. As a result, R is reading events meant for Java and vice-versa and bad
things happen!

    There are two solutions:

        * use the Java graphics device which uses the Java graphics facilities
to do the rendering;
        * don't run the GUI and the X11 device at the same time. 

    The second solution is clearly not ideal. What we can do is to compile the
X11 device code to be thread-safe. However, the same effect will be seen if we
load another X11 event handler (e.g. the Tcl/Tk library). 

Michael

michael_bibo at health.qld.gov.au




More information about the R-help mailing list