Skip to content

X11 problem with R 2.7 OS X 10.4.11

3 messages · statmobile, Joerg van den Hoff, Kasper Daniel Hansen

#
I must have missed these emails being sent around, probably because I 
only just now updated to 2.7.  I noticed here that:

https://stat.ethz.ch/pipermail/r-sig-mac/2008-May/004981.html

Joerg is saying that he's having problems running R plots from the 
command line when the plots are going to X11.  I have the exact same 
problems he is discussing, although issuing the `x11(type="Xlib")' in 
one session does not help me in future sessions.

The main purpose of this email is to assure Joerg and others that he is 
not the only one experiencing this.

I feel that this is a major issue, because I'm a big emacs fan, and 
running R through ESS is essentially running it in the terminal.  So I 
can't run graphs from emacs without this ugly workaround.  Any help over 
the matter would be greatly appreciated.

As a side note, and one I was experiencing with previous versions of R. 
  If you issue the command 'dev.off()' in X11, R instead opens about 3 
other graphic windows.

Thanks in advance for any input on the matter.
#
On Sun, May 25, 2008 at 09:02:19PM -0400, statmobile wrote:
I'm thankful for this feedback, since up to now I fast left with the
impression that somehow it must be all me fault :-). 

I posted the problem a second time on may 13, namely:

==============================CUTAGAIN========================================
hi everybody,

some 10 days ago I posted my problems with 2.7.0 when plotting to the X11()
device (with it's new default type "cairo"). here's an excerpt from the previous
mails:

=================================CUT=================================
which actually should read 10.4.11 ...
I'm still experiencing problems with cairo-based graphics and 2.7.0.: 

while the problem somehow went away on my powerbook g4 after having once
explicitly used `x11(type="Xlib")',  i.e. even after restart of R now plotting
procedes as it should, the same procedure was not successful on my tabletop ppc g5 (both
machines with macos 10.4.11.). here the problem persists as described in my
first mail: any plotting command, e.g.

plot(1:10) 

to the default x11 device (i.e. with type = "cairo")
plots only the data points on an otherwise empty canvas, then cpu time goes to
100% and R does not come back to the prompt ("hangs"). at which stage I can only
kill R, e.g. by throwing away the terminal running R (not responding to Ctrl-C
or Ctrl-D any more).

I have not the slightest idea what can go wrong specifically on my machine. any
suggestions what (and how) to log or where to look greatly appreciated.

joerg

I really would be thankful if somebody can point me in the right direction.

when I `ktrace' R until after issuing the plot-command I get a _huge_ output
file (a few hundred Meg in very short time) which for the most part shows
something like

10464 R        RET   read 4096/0x1000
10464 R        CALL  lseek(0xc,0x9f4000,0)
10464 R        RET   lseek 0
10464 R        CALL  read(0xc,0x1cd2a00,0x1000)
10464 R        GIO   fd 12 read 4096 bytes

which seemingly repeats infinitely. the strangest thing for me is, that
I first observed the described behaviour on both my machines (table top as well
as labtop ppc). but as explained above, plotting _once_ to X11(type="Xlib") 
"repaired" everything on the labtop: now plotting to X11(type="cairo") works
just fine for whatever reason. the same did _not_ happen on the tabletop
machine. here I `cairo' is definitily not working properly and I have to resort
to an explicit `X11(type="Xlib")' prior to plotting to avoid disaster.

has anybody seen the same behaviour?
==============================CUTAGAIN========================================

which shows that I can confirm your observation (using X11(type="Xlib")
does not help for the next R session) for my table top machine --
whereas the labtop now works as it should (as described in my first post
of the problem).

unfortenuately, my second post did no longer yield any response from
the core members which I interpreted being due to being rated 
as "not important enough or problem your fault since nobody 
else confirms your problem". 

hopefully, it is taken now more seriously? and if I can provide any
information needed to localize the source of the problem please let me
know.

currently for me it is really a pain to use R under X11 (forgeting to
explicitely open X11(type="Xlib") prior to plotting requires explicit
kill of the R process in order to regain control over the terminal in
which R was started etc.).

joerg
#
I had the same problem for one session when I upgraded R. But then it  
disappeared when I quit R and quit X. So from my perspective it was a  
temporary glitch. I am also using ESS so I also depend on this thing  
working well. Btw. you may or may not have noticed that quartz() now  
works from the Terminal (=ESS). While I am loath to suggest such a  
thing, perhaps you could try a reboot.

If you are running Leopard I would make sure that you do not set you  
display variable in either .Rprofile, .Renviron or .profile,.  
bashrc, .bash_login

Kasper
On May 25, 2008, at 6:02 PM, statmobile wrote: