[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mac
Subject:    Re: [R-SIG-Mac] R stops abruptly applying textures in rgl
From:       Duncan Murdoch <murdoch.duncan () gmail ! com>
Date:       2014-03-20 13:53:14
Message-ID: 532AF2CA.4000902 () gmail ! com
[Download RAW message or body]

On 20/03/2014 9:26 AM, Rainer M Krug wrote:
> "Agustin Diez Castillo"<Agustin.Diez@uv.es> writes:
> 
> > Duncan,
> > Find the script [1] , SessionInfo [2]  and the Mac error [3]  in case it helps. \
> > Executing R from the terminal R doesn't freeze and I got the same message that in \
> > Ubuntu 13.04 [4] # With rgl installed in ~/Library/R/
> > library(rgl)
> > # Set directory
> > setwd("~/")
> > #Working
> > rgl.bg(sphere=TRUE, texture=system.file("textures/bump_dust.png", \
> > package="rgl"),back="filled") #Copying the same texture to the working directory
> > system("cp ~/Library/R/3.0/library/rgl/textures/bump_dust.png bump_dust.png")
> > # expanded version also works
> > expanded<-paste(getwd(),"/bump_dust.png",sep="")
> > # Testing
> > rgl.bg(sphere=TRUE, texture=expanded,back="filled")
> > #Hanging R.app
> > rgl.bg(sphere=TRUE, texture="~/bump_dust.png",back="filled")
> 
> Confirmed as described - works in terminal, crashes R gui
> Additionally: works in RStudio with the following error:
> 
> ,----
> > > rgl.bg(sphere=TRUE, texture="~/bump_dust.png",back="filled")
> > Warning message:
> > In rgl.material(color = color, back = back, ...) :
> > RGL: Pixmap load: unable to open file '~/bump_dust.png' for reading

Thanks.  I imagine what is happening is that rgl tries to generate an 
error when it fails to open the non-existent file, but something goes 
wrong, and it doesn't end up being handled properly by R.app. (I would 
guess a workaround is to call normalizePath() to expand the tilde; rgl 
should probably be doing that, but currently doesn't.)

I'll see if the extra info lets me reproduce it.

Duncan Murdoch
> `----
> 
> ,----
> > > version
> > _
> > platform       x86_64-apple-darwin10.8.0
> > arch           x86_64
> > os             darwin10.8.0
> > system         x86_64, darwin10.8.0
> > status         Patched
> > major          3
> > minor          0.3
> > year           2014
> > month          03
> > day            06
> > svn rev        65134
> > language       R
> > version.string R version 3.0.3 Patched (2014-03-06 r65134)
> > nickname       Warm Puppy
> > > library(rgl)
> > > sessionInfo()
> > R version 3.0.3 Patched (2014-03-06 r65134)
> > Platform: x86_64-apple-darwin10.8.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
> > 
> > other attached packages:
> > [1] rgl_0.93.996
> > > 
> `----
> 
> Cheers,
> 
> Rainer
> 
> 
> > -------
> > [2] R version 3.0.3 (2014-03-06)
> > Platform: x86_64-apple-darwin10.8.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
> > 
> > other attached packages:
> > [1] rgl_0.93.996
> > ----------
> > [3] http://pastebin.com/tQ8FRFzc
> > 
> > [4] Warning message:
> > In rgl.material(color = color, back = back, ...) :
> > RGL: Pixmap load: unable to open file '~/bump_dust.png' for reading
> > Agustín
> > 
> > 
> > > On 14-03-19 10:22 AM, Agustin Angel Diez Castillo wrote:
> > > > Hi,
> > > > When applying textures to an rgl object I can do it without problem if the \
> > > > applied texture if the texture file is
> > called in an expand form [1]. However if the same file is called with tilde [2], \
> > R will stop abruptly. I've tested it in three different machines, all running \
> > 9.2. The same in Unbuntu 13.04 drops a warning message [3] but R continues \
> > running.
> > > > Agustin
> > > > [1] /Users/myuser/myfile.png
> > > > [2] ~/myfile.png
> > > > [3] In rgl.material(...) :
> > > > RGL: Pixmap load: unable to open file \
> > > > '~/gvSIG-desktop/gvSIG-desktop-2066/theme/splash.png' for reading 
> > > 
> > > I am unable to reproduce this.  Could you please post a complete script
> > > that reproducibly causes the crash for you, and post information about
> > > rgl, R, and MacOS versions?
> > > 
> > > Duncan Murdoch
> > > 
> > > 
> > > 
> > 
> > 
> > --
> > ******************************************************
> > Dr. Agustín Diez Castillo
> > Departament de Prehistòria i Arqueologia
> > Phone:   +34 963 86 42 42
> > Avda. Blasco Ibañez, 28   Fax:      +34 963 86 42 34
> > València 46010
> > 
> > _______________________________________________
> > 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic