[R] rgl-snapshot failed (err-msg: "failed")

Duncan Murdoch murdoch at stats.uwo.ca
Sat Oct 11 00:44:25 CEST 2008

On 10/10/2008 8:55 AM, Oliver Bandel wrote:
> Zitat von Duncan Murdoch <murdoch at stats.uwo.ca>:
>> On 10/10/2008 8:13 AM, Oliver Bandel wrote:
>>> Hello,
>>> I tried to use rgl.snapshot and it failed.
>>> The error message was not very verbose:
>>> ======================
>>>> plot3d( motion[[idx+2]], motion[[idx+1]], motion[[idx]] )
>>>> rgl.snapshot(filename="/tmp/shot_01.png", fmt="png")
>>> [1] "failed"
>>> ======================
>>> There was a graphic created by rgl, but the snapshot was
>>> not created.
>>> The same problem occurs, when I use
>>>     > example(rgl.snapshot)
>>> The graphic/animation will be created, but there is no possibility
>>> to create the output-files.
>>> I use "R version 2.4.0 Patched (2006-11-25 r39997)".
>>> Is this a problem of this old version? or is there
>>> maybe a general problem, independent of the version?
>> This is a problem with the build.  rgl is not easy to build, because
>> it
>> links to a lot of external libraries.  In this case it looks as
>> though
>> your build (the one from R-forge?  You should say...) did not link to
>> libpng.
> [...]
> I installed a binary (Debian etch).
> I may try the same things at my laptop.
> There I have Ubuntu, and it uses much newer R versions.
> maybe they also have fixed this problem.
> If the error messages would be a littlebid more verbose,
> this could help.
> Is it possible to configure the verboseness of the error messages?

No.  Better error messages would help, but this is an error you 
shouldn't see.  You should have seen the failure to find libpng at 
configure time, and not tried to run rgl.snapshot.  (On Windows it looks 
like this when it works:

   checking for libpng...yes

I forget what it looks like on Linux.)  But you're installing a binary, 
so you should complain to whoever produced it that they're producing a 
defective one.

Duncan Murdoch

More information about the R-help mailing list