Skip to content

X11 protocol errors after all x11 devices are closed (PR#1065)

4 messages · Kurt Hornik, Thomas J Vogels, Brian Ripley

#
null device
          1
Warning messages:
1: X11 protocol error: BadAccess (attempt to access private resource denied)
2: X11 protocol error: BadAccess (attempt to access private resource denied)

This only happens if all x11 devices are shut down, so the X11 connection
is restarted.  We had problems with this when the event handlers
were changed prior to 1.3.0, and it looks as if the logic is still
incorrect.

As far as I can see subsequent plots are correct.

Carrying on:
null device
          1
Warning message:
X11 protocol error: BadAccess (attempt to access private resource denied)

(only one error this time).


--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status =
 major = 1
 minor = 3.0
 year = 2001
 month = 06
 day = 22
 language = R

Search Path:
 .GlobalEnv, package:ctest, Autoloads, package:base
#
On Debian GNU/Linux, I do not seem to get the errors:

R> x11()
R> dev.off()
null device 
          1 
R> x11()
R> plot.new()
R> dev.off()
null device 
          1 
R> x11()
R> plot.new()

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
ripley@stats.ox.ac.uk writes:
I see the same thing on an AIX machine with the patched R-release of
yesterday.  I've recently noticed this problem when I tried to change
the colortype.  For this you have to shutdown all devices, then I got
the error messages.  I figured this might be an "AIX" thing at
first...

Possibly related (if not, I'll file separate bug reports):

1) I cannot reset the colortype.  When I run out of colors, I used to
   be able to just shutdown all devices, then restart with
   x11(colortype=....).  Now I get:

R> x11()
R> plot(1:100,col=rainbow(100))
Error in plot.xy(xy, type, col = col, pch = pch, cex = cex, bg = bg, lty = lty,  : 
        Error: X11 cannot allocate additional graphics colors.
Consider using X11 with colortype="pseudo.cube" or "gray".
R> dev.off()
null device 
          1 
R> x11(colortype="pseudo.cube")
R> plot(1:100,col=rainbow(100))
Error in plot.xy(xy, type, col = col, pch = pch, cex = cex, bg = bg, lty = lty,  : 
        Error: X11 cannot allocate additional graphics colors.
Consider using X11 with colortype="pseudo.cube" or "gray".
In addition: Warning messages: 
1: X11 protocol error: BadAccess (attempt to access private resource denied) 
2: X11 protocol error: BadAccess (attempt to access private resource denied) 
3: X11 protocol error: BadAccess (attempt to access private resource denied) 
R> dev.off()
null device 
          1 
R> x11(colortype="gray")
R> plot(1:100,col=rainbow(100))
Error in plot.xy(xy, type, col = col, pch = pch, cex = cex, bg = bg, lty = lty,  : 
        Error: X11 cannot allocate additional graphics colors.
Consider using X11 with colortype="pseudo.cube" or "gray".
In addition: Warning messages: 
1: X11 protocol error: BadAccess (attempt to access private resource denied) 
2: X11 protocol error: BadAccess (attempt to access private resource denied) 
3: X11 protocol error: BadAccess (attempt to access private resource denied) 
R> dev.off()
null device 
          1 


2) Plots are not updated if the window is made visible (from being
   partially obscured) during a computation before or during the plot.
   Let's say my xterm (or emacs window) covers the north-west quadrant
   of R's x11 device window.  Then:

R> data(iris)
R> pairs(iris[,1:4])

   While pairs is drawing, I bring the device window to the front.
   All plots that were drawn by pairs will not be redrawn once pairs
   is done.  So I have to push the device window in the back, then
   bring it to the front again to force a redraw/refresh.

   This gets really annoying when you have two X11 devices open.  If
   you bring the inactive one to the front while R is busy plotting on
   the active device, the inactive one will not be redrawn/refreshed
   once plotting is done.  Just white space staring back at you...

Regards,
  -tom



R> R.version
         _                     
platform powerpc-ibm-aix4.3.1.0
arch     powerpc               
os       aix4.3.1.0            
system   powerpc, aix4.3.1.0   
status   Patched               
major    1                     
minor    3.0                   
year     2001                  
month    08                    
day      21                    
language R
#
Tom,

Thanks.  Yes, I think 1) is related, and the original bug seems only to
happen on pseudocolor screens (which I was using).

I suspect that narrows it down enough for me to find it.

Brian
On 22 Aug 2001, Thomas Vogels wrote: