On 22/05/2009 11:29 AM, Duncan Murdoch wrote:
On 5/21/2009 2:17 PM, William Dunlap wrote:
I noticed the following file descriptor leak when I couldn't remove
a package unless I shut down the R session that had loaded and
used it. The function that triggered the problem printed the output
of a call to parse(). Each time one prints a srcref a connection is
opened and not closed. It looks like it happens in
as.character.srcref's
call to getSrcLines, which has some logic I don't understand about
closing 'srcfile' on exit only if !.is.Open(srcfile):
I have a simpler recipe to reproduce the crash now:
tf <- tempfile()
con <- file(tf, open="w", encoding="unknown")
This gives an error message about an unsupported conversion
and leaves the con object only partially built. closeAllConnections()
will then crash.
Should be relatively easy to fix...I'll take a look.
Fixed now in R-devel and R-patched.
Duncan Murdoch
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel