From deepayan.sarkar at gmail.com  Wed Jun 22 12:10:38 2011
From: deepayan.sarkar at gmail.com (Deepayan Sarkar)
Date: Wed, 22 Jun 2011 15:40:38 +0530
Subject: [Rd] Cases of TAB-completion that hang Rterm
In-Reply-To: <BANLkTikY2OD5JL2DC0JoHCVsH4wBAWDMOg@mail.gmail.com>
References: <BANLkTikY2OD5JL2DC0JoHCVsH4wBAWDMOg@mail.gmail.com>
Message-ID: <BANLkTi=c3-G2EC8UM5Kf4C88EvxTknX42g@mail.gmail.com>

On Tue, Jun 7, 2011 at 1:49 PM, Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:
> FYI,
>
> via a bug report of one of my packages, I discovered that the
> following cases will hang Rterm when using TAB completion:
>
> CASE #1:
> Adding an empty default function for tail() causes Rterm on Windows to
> hang if one press TAB at the prompt:
>
> % Rterm -vanilla
>> tail.default <- function(...) {}
>> [PRESS TAB]
> Error in specialOpLocs(text) :
> ?(list) object cannot be coerced to type 'double'
>
> After this Rterm becomes completely unresponsive. ?The same error
> message will show up with Rgui, but R remains responsive.
>
>
> CASE #2:
> While troubleshooting the above, I discovered that if one does:
>
>> debug(utils:::.guessTokenFromLine)
>> [PRESS TAB]
>
> or
>
>> debug(utils:::.win32consoleCompletion)
>> [PRESS TAB]
>
> then Rterm hangs too (not Rgui).
>
> This happens with R v2.13.0 patched (2011-05-30 r56020) and R v2.14.0
> devel (2011-05-30 r56020) on Windows.

This should now be fixed in both r-devel (for a few days now) and r-patched.

-Deepayan



[Rd] Cases of TAB-completion that hang Rterm
Deepayan Sarkar