Well, the error seems clear: your R session has too many files
open. Now most OSes do have limited tables of files per process,
but the numbers are not small: on Mac OS I believe it is 256
(that's what bash reports on mine): 1024 is a common value for
other Unixen.
You could try closeAllConnections(), in case that helps enough to
let you shutdown the session (but R allows only 128 connections, so
that is not the main cause here).
Have you any idea what you might be doing that opens hundreds of
files (at a lower level than R). Are you actually using those
spatial packages (it might be one of those)?
Thanks for the hint!
Your guess is absolutely right! Inside a function there
are calls to readGDAL and readOGR (package rgdal).
I did put closeAllConnections() inside that function.
Hopefully that will solve the problem. If not, I will ask
the R-Sig-Geo list about that issue.
I apologise, R GUI is not causing that problem!
Roland
It is possible to raise the limit on the number of open files (in
bash, ulimit -n), but this is not advisable unless you need it.
On Fri, 20 Mar 2009, Roland Kaiser wrote:
Hi!
I'm using the R GUI with joy ever since, despite some occasional
misbehaviour. However, the last days I have noticed some errors
that really waste a considerable amount of time.
I'm sorry, I can't come up with a reproducible example,
but I try to explain how the error was raised in my case.
During testing of code I subsequently executed
lines by cmd + return.
After several times suddenly the working directory
in the GUI shows <deleted> instead of the path.
Maybe I did some strange key combination here,
but in the past I did never deleted the path by accident?
The console then states:
2009-03-20 10:06:08.537 R[620] Cannot load Interface Builder file
'/System/Library/Frameworks/AppKit.framework/Resources/
German.lproj/NSAlertPanel.nib'
I am not able to save any open files, but can copy
and paste to TextEdit to prevent loss.
Funny to see what sessionInfo() tells invoked after.
sessionInfo()
Fehler in gzfile(file, "rb") : kann Verbindung nicht öffnen
Zusätzlich: Warning message:
In gzfile(file, "rb") :
kann komprimierte Datei '/Users/roli/Library/R/2.8/library/
maptools/Meta/package.rds' nicht öffnen. Grund evtl. 'Too many
open files'
when q() the session console prints again
… too many open files … and quits.
SessionInfo after restart and reloading packages and data
GUI version is Mac OS X GUI rev. 5372 for R 2.8.x
sessionInfo()
R version 2.8.1 (2008-12-22)
i386-apple-darwin8.11.1
locale:
de_AT.UTF-8/de_AT.UTF-8/C/C/de_AT.UTF-8/de_AT.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] maptools_0.7-16 foreign_0.8-29 spatstat_1.14-9 deldir_0.0-7
[5] gpclib_1.4-2 mgcv_1.4-1.1 rgdal_0.6-7 sp_0.9-32
loaded via a namespace (and not attached):
[1] grid_2.8.1 lattice_0.17-17
Any Ideas what will cause that crash?
Is a matter of my system locale (German in this case).
No.
--
Brian D. Ripley, [email protected]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac