Re: [R-SIG-Mac] Lion and X11

2012-01-30 Thread Martin Renner
I tried CRAN R again, and could NOT reproduce this error, at least not this 
time. Maybe I inadvertently used my own compiled version last time I tried CRAN 
R.  I may try the folks at homebrew to trace this issue. Thank you so much to 
everybody who chimed in. 

Cheers,
Martin



On 28 Jan 2012, at 20:35 , Simon Urbanek wrote:

 Martin,
 
 On Jan 28, 2012, at 9:31 PM, Simon Urbanek wrote:
 
 
 On Jan 28, 2012, at 8:21 PM, Martin Renner wrote:
 
 Thank you to everybody who replied! Simon, on my machine, I can reproduce 
 this segfault every time using these steps:
 
 - open Terminal.app (or iTerm or Aquamacs), start R --vanilla  (RStudio, or 
 R.app)
 in R:   
 - x11()   (in Terminal, my R defaults to x11, without me doing anything; in 
 R.app or RStudio, I call x11() to reproduce this segfault. 
 - plot (1:10) or any other plotting command. 
 
 Can you send us your sessionInfo(), please?
 
 
 Never mind - you did in your first e-mail. But from that info it is clear 
 that you're not using CRAN R, so I fear we can't really help you since this 
 problem is specific to your own R build. You should try the R release on CRAN 
 to see if you can reproduce it with that. If not, you may want to use gdb to 
 trace the issue (R -d gdb) - it could be R or some library you're using ... 
 If you want us to look int that, you'd have to provide exact details on how 
 you compiled that R (compiler versions, configure flags etc.).
 
 Cheers,
 Simon
 
 
 
 
 I am not aware of any other conscious or subconscious steps I'm taking. 
 Plotting to quartz() or pdf() works fine. My .bashrc sets R_LIBS and the 
 usual additions to the default PATH, nothing that should affect R or x11. 
 Since I haven't heard back a flood of people saying, 'yes, me too', I 
 suspect, this issue is specific to my setup. I've tried clearing out any 
 preference files related to x11, to no affect. When calling plot (1:10), I 
 get a new x11 graphics window, ten circles and an x-axis with tick-marks, 
 and a segfault. No box(), no y-axis. There's no .Rprofile in my home 
 directory. Are there any other preference files that could be corrupted? 
 
 My display variable looks fine, so Christian seems to have a different 
 issue than me. 
 Sys.getenv (DISPLAY)
 [1] /tmp/launch-EepjEz/org.x:0
 
 Cheers,
 Martin
 
 
 
 
 
 On 28 Jan 2012, at 10:17 , Simon Urbanek wrote:
 
 Martin,
 
 can you specify more precisely what you're doing? Issuing the code you 
 sent would use Quartz, so apparently you're doing other things that you 
 didn't mention - so can you share those so we can try to reproduce it?
 
 Thanks,
 Simon
 
 
 On Jan 27, 2012, at 7:17 PM, Martin Renner wrote:
 
 Hi All,
 
 Is anybody else experiencing problems with X11 and R under Mac OS X 10.7 
 (Lion)? If yes, maybe it's not specific to my machine. R segfaults when I 
 try to plot to a X11 device, e.g. open R in the terminal and calling   
 plot (1:10)
 (see below). Plotting to a quartz device works fine. I'm using R-2.14.1 
 (see below), compiled from source using homebrew. I've seen the same 
 issue with the CRAN binaries, with a vanilla compile from source of 
 R-2.14.1 and even with an old R-2.9.2. 
 
 I wonder whether I'd have to wait for a fix from Apple, or whether 
 there's a work-around like something that can be done during 
 configuration? 
 
 Cheers,
 Martin
 
 
 
 plot (1:10)
 
 *** caught segfault ***
 address 0x0, cause 'memory not mapped'
 
 Traceback:
 1: axis(side = side, at = at, labels = labels, ...)
 2: Axis.default(...)
 3: Axis(...)
 4: localAxis(if (is.null(y)) xy$x else x, side = 1, ...)
 5: plot.default(1:10)
 6: plot(1:10)
 
 
 
 sessionInfo()
 R version 2.14.1 (2011-12-22)
 Platform: x86_64-apple-darwin11.2.0 (64-bit)
 
 locale:
 [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 
 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Lion and X11

2012-01-28 Thread Kasper Daniel Hansen
For what it is worth I don't see this problem on Snow Leopard, self-compiled.

You can make quartz the default device by putting
 Sys.setenv(R_INTERACTIVE_DEVICE = quartz)
in your .Rprofile.

Kasper

On Fri, Jan 27, 2012 at 7:17 PM, Martin Renner greatauk...@gmail.com wrote:
 Hi All,

 Is anybody else experiencing problems with X11 and R under Mac OS X 10.7 
 (Lion)? If yes, maybe it's not specific to my machine. R segfaults when I try 
 to plot to a X11 device, e.g. open R in the terminal and calling
 plot (1:10)
 (see below). Plotting to a quartz device works fine. I'm using R-2.14.1 (see 
 below), compiled from source using homebrew. I've seen the same issue with 
 the CRAN binaries, with a vanilla compile from source of R-2.14.1 and even 
 with an old R-2.9.2.

 I wonder whether I'd have to wait for a fix from Apple, or whether there's a 
 work-around like something that can be done during configuration?

 Cheers,
 Martin



 plot (1:10)

  *** caught segfault ***
 address 0x0, cause 'memory not mapped'

 Traceback:
  1: axis(side = side, at = at, labels = labels, ...)
  2: Axis.default(...)
  3: Axis(...)
  4: localAxis(if (is.null(y)) xy$x else x, side = 1, ...)
  5: plot.default(1:10)
  6: plot(1:10)



 sessionInfo()
 R version 2.14.1 (2011-12-22)
 Platform: x86_64-apple-darwin11.2.0 (64-bit)

 locale:
 [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

 attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base


 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Lion and X11

2012-01-28 Thread Simon Urbanek
Martin,

can you specify more precisely what you're doing? Issuing the code you sent 
would use Quartz, so apparently you're doing other things that you didn't 
mention - so can you share those so we can try to reproduce it?

Thanks,
Simon


On Jan 27, 2012, at 7:17 PM, Martin Renner wrote:

 Hi All,
 
 Is anybody else experiencing problems with X11 and R under Mac OS X 10.7 
 (Lion)? If yes, maybe it's not specific to my machine. R segfaults when I try 
 to plot to a X11 device, e.g. open R in the terminal and calling   
 plot (1:10)
 (see below). Plotting to a quartz device works fine. I'm using R-2.14.1 (see 
 below), compiled from source using homebrew. I've seen the same issue with 
 the CRAN binaries, with a vanilla compile from source of R-2.14.1 and even 
 with an old R-2.9.2. 
 
 I wonder whether I'd have to wait for a fix from Apple, or whether there's a 
 work-around like something that can be done during configuration? 
 
 Cheers,
 Martin
 
 
 
 plot (1:10)
 
 *** caught segfault ***
 address 0x0, cause 'memory not mapped'
 
 Traceback:
 1: axis(side = side, at = at, labels = labels, ...)
 2: Axis.default(...)
 3: Axis(...)
 4: localAxis(if (is.null(y)) xy$x else x, side = 1, ...)
 5: plot.default(1:10)
 6: plot(1:10)
 
 
 
 sessionInfo()
 R version 2.14.1 (2011-12-22)
 Platform: x86_64-apple-darwin11.2.0 (64-bit)
 
 locale:
 [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Lion and X11

2012-01-28 Thread Simon Urbanek

On Jan 28, 2012, at 1:46 PM, cstrato wrote:

 Yes, although I have started X11.app and run R from within an xterm I get:
 
  plot(1:8)
 No protocol specified
 Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma, d$colortype, 
  :
  unable to start device X11
 In addition: Warning message:
 In function (display = , width, height, pointsize, gamma, bg,  :
  unable to open connection to X11 display ''

Chances are that you DISPLAY is unset - you possibly messed with it in your 
startup files so R can't use X11 unless you give it the proper display. On a 
clean OS X you will see it set properly, e.g.:

 Sys.getenv(DISPLAY)
[1] /tmp/launch-byCZTH/org.x:0

Please check that your DISPLAY is set (and that you don't mess with R options, 
either). This is setting is automatic on SL/Lion.

Cheers,
Simon



  sessionInfo()
 R version 2.14.1 (2011-12-22)
 Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
 
 locale:
 [1] C
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base
 
 
 I have never had this problem on Snow Leopard, Leopard or Tiger!
 
 Does someone have an idea what might be the reason?
 
 Best regards
 Christian
 _._._._._._._._._._._._._._._._._._
 C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
 V.i.e.n.n.a   A.u.s.t.r.i.a
 e.m.a.i.l:cstrato at aon.at
 _._._._._._._._._._._._._._._._._._
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Lion and X11

2012-01-28 Thread cstrato

Dear Simon,

Thank you for your replies, I understand now your explanation about R.app.

I do not think that the topic on the locale is unrelated to the plot 
problem, since adding to .bashrc:

  export LC_CTYPE=en_US.UTF-8
  export LC_ALL=en_US.UTF-8
does solve the problem with plot(), as you can see from the following 
output:


 Sys.getenv(DISPLAY)
[1] :0
 sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
 plot(1:8)


It is still not clear to me why I need to add above lines to .bashrc, 
since on my Snow Leopard machine this is not necessary. The locale there 
is also only C.


BTW, to run R I start always X11.app first and then start R from xterm, 
I do not use the Terminal.


Best regards
Christian


On 1/29/12 12:03 AM, Simon Urbanek wrote:


On Jan 28, 2012, at 1:46 PM, cstrato wrote:


Yes, although I have started X11.app and run R from within an xterm I get:


plot(1:8)

No protocol specified
Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma, d$colortype,  :
  unable to start device X11
In addition: Warning message:
In function (display = , width, height, pointsize, gamma, bg,  :
  unable to open connection to X11 display ''


Chances are that you DISPLAY is unset - you possibly messed with it in your 
startup files so R can't use X11 unless you give it the proper display. On a 
clean OS X you will see it set properly, e.g.:


Sys.getenv(DISPLAY)

[1] /tmp/launch-byCZTH/org.x:0

Please check that your DISPLAY is set (and that you don't mess with R options, 
either). This is setting is automatic on SL/Lion.

Cheers,
Simon




sessionInfo()

R version 2.14.1 (2011-12-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base




I have never had this problem on Snow Leopard, Leopard or Tiger!

Does someone have an idea what might be the reason?

Best regards
Christian
_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a   A.u.s.t.r.i.a
e.m.a.i.l:cstrato at aon.at
_._._._._._._._._._._._._._._._._._

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac







___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Lion and X11

2012-01-28 Thread Simon Urbanek
Martin,

On Jan 28, 2012, at 9:31 PM, Simon Urbanek wrote:

 
 On Jan 28, 2012, at 8:21 PM, Martin Renner wrote:
 
 Thank you to everybody who replied! Simon, on my machine, I can reproduce 
 this segfault every time using these steps:
 
 - open Terminal.app (or iTerm or Aquamacs), start R --vanilla  (RStudio, or 
 R.app)
 in R:   
  - x11()   (in Terminal, my R defaults to x11, without me doing anything; in 
 R.app or RStudio, I call x11() to reproduce this segfault. 
  - plot (1:10) or any other plotting command. 
 
 Can you send us your sessionInfo(), please?
 

Never mind - you did in your first e-mail. But from that info it is clear that 
you're not using CRAN R, so I fear we can't really help you since this problem 
is specific to your own R build. You should try the R release on CRAN to see if 
you can reproduce it with that. If not, you may want to use gdb to trace the 
issue (R -d gdb) - it could be R or some library you're using ... If you want 
us to look int that, you'd have to provide exact details on how you compiled 
that R (compiler versions, configure flags etc.).

Cheers,
Simon


 
 
 I am not aware of any other conscious or subconscious steps I'm taking. 
 Plotting to quartz() or pdf() works fine. My .bashrc sets R_LIBS and the 
 usual additions to the default PATH, nothing that should affect R or x11. 
 Since I haven't heard back a flood of people saying, 'yes, me too', I 
 suspect, this issue is specific to my setup. I've tried clearing out any 
 preference files related to x11, to no affect. When calling plot (1:10), I 
 get a new x11 graphics window, ten circles and an x-axis with tick-marks, 
 and a segfault. No box(), no y-axis. There's no .Rprofile in my home 
 directory. Are there any other preference files that could be corrupted? 
 
 My display variable looks fine, so Christian seems to have a different issue 
 than me. 
 Sys.getenv (DISPLAY)
 [1] /tmp/launch-EepjEz/org.x:0
 
 Cheers,
 Martin
 
 
 
 
 
 On 28 Jan 2012, at 10:17 , Simon Urbanek wrote:
 
 Martin,
 
 can you specify more precisely what you're doing? Issuing the code you sent 
 would use Quartz, so apparently you're doing other things that you didn't 
 mention - so can you share those so we can try to reproduce it?
 
 Thanks,
 Simon
 
 
 On Jan 27, 2012, at 7:17 PM, Martin Renner wrote:
 
 Hi All,
 
 Is anybody else experiencing problems with X11 and R under Mac OS X 10.7 
 (Lion)? If yes, maybe it's not specific to my machine. R segfaults when I 
 try to plot to a X11 device, e.g. open R in the terminal and calling   
 plot (1:10)
 (see below). Plotting to a quartz device works fine. I'm using R-2.14.1 
 (see below), compiled from source using homebrew. I've seen the same issue 
 with the CRAN binaries, with a vanilla compile from source of R-2.14.1 and 
 even with an old R-2.9.2. 
 
 I wonder whether I'd have to wait for a fix from Apple, or whether there's 
 a work-around like something that can be done during configuration? 
 
 Cheers,
 Martin
 
 
 
 plot (1:10)
 
 *** caught segfault ***
 address 0x0, cause 'memory not mapped'
 
 Traceback:
 1: axis(side = side, at = at, labels = labels, ...)
 2: Axis.default(...)
 3: Axis(...)
 4: localAxis(if (is.null(y)) xy$x else x, side = 1, ...)
 5: plot.default(1:10)
 6: plot(1:10)
 
 
 
 sessionInfo()
 R version 2.14.1 (2011-12-22)
 Platform: x86_64-apple-darwin11.2.0 (64-bit)
 
 locale:
 [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 
 
 ___
 R-SIG-Mac mailing list
 R-SIG-Mac@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-mac
 
 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] Lion and X11

2012-01-27 Thread Martin Renner
Hi All,

Is anybody else experiencing problems with X11 and R under Mac OS X 10.7 
(Lion)? If yes, maybe it's not specific to my machine. R segfaults when I try 
to plot to a X11 device, e.g. open R in the terminal and calling   
 plot (1:10)
(see below). Plotting to a quartz device works fine. I'm using R-2.14.1 (see 
below), compiled from source using homebrew. I've seen the same issue with the 
CRAN binaries, with a vanilla compile from source of R-2.14.1 and even with an 
old R-2.9.2. 

I wonder whether I'd have to wait for a fix from Apple, or whether there's a 
work-around like something that can be done during configuration? 

Cheers,
Martin



 plot (1:10)

 *** caught segfault ***
address 0x0, cause 'memory not mapped'

Traceback:
 1: axis(side = side, at = at, labels = labels, ...)
 2: Axis.default(...)
 3: Axis(...)
 4: localAxis(if (is.null(y)) xy$x else x, side = 1, ...)
 5: plot.default(1:10)
 6: plot(1:10)



 sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-apple-darwin11.2.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 
 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac