From hb at biostat.ucsf.edu  Thu Dec 29 15:49:26 2011
From: hb at biostat.ucsf.edu (Henrik Bengtsson)
Date: Thu, 29 Dec 2011 15:49:26 +0100
Subject: [Rd] Crashing R with readline()
Message-ID: <CAFDcVCTDivB8VxE3Oq+exsyjEc6pc_iEpnVCNu0Bf0YD6X+bQQ@mail.gmail.com>

I get the following with R v2.14.1 patched on Windows 7:

% Rterm --vanilla --silent

> sessionInfo()
R version 2.14.1 Patched (2011-12-26 r58001)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

> readline(sprintf("%-*s:", 180, "A prompt"))
A prompt

                                        :
[1] ""
> q("no")
Error: caught access violation - continue with care

It is a consistent behavior.

/Henrik



[Rd] Crashing R with readline()
Henrik Bengtsson