[ESS] options(error=recover) produces ESS freeze

Keith Ponting k.ponting at aurix.com
Mon Nov 9 10:17:04 CET 2009


> Peter Meilstrup wrote:
> > I keep reproducing a very simple recipe for making ESS and the
entire
> > Emacs process freeze:
> >
> > 1. set options(error=recover)
> > 2. Move to a buffer where there is a group of statements, one of
which
> > will produce an error. For example:
> >
> > options(error=recover)
> > library(datasets)
> > avg <- by(warpbreaks, list(warpbreaks$wool, warpbreaks$tnsion),
> > function(x)mean(x$breaks)))
> > #previous line generates error due to typo
> > print(avg)
> >
> > 3. use C-p or C-r etc. to evaluate the paragraph.
> > 4. RESULT: emacs becomes completely unresponsive.
> >
> > This makes ESS darn near unusable for me. This can't be normal, can
> it?
> 
> This works fine for me using R-2.10.0, emacs 22.3.1 and ess 5.6 (svn
> checkout) on Windows or R-2.10.0, emacs 23.1.2 and ess 5.4 on Linux
> 
>  > options(error=recover)
>  > library(datasets)
>  > avg <- by(warpbreaks, list(warpbreaks$wool, warpbreaks$tnsion),
> + function(x)mean(x$breaks)))
> Error: unexpected ')' in:
> "avg <- by(warpbreaks, list(warpbreaks$wool, warpbreaks$tnsion),
> function(x)mean(x$breaks)))"
> No suitable frames for recover()
>  > #previous line generates error due to typo  > print(avg) Error in
> print(avg) : object 'avg' not found
> 
> Enter a frame number, or 0 to exit
> 
> 1: print(avg)
> 
> Selection: 0
>  >
> 
> So I don't think it is necessarily an emacs/ess problem.
> 
> Best,
> 
> Jim
> 
> 
> 
> >
> > I'm using ESS 5.5 with R 2.10.0 on both emacs 22.1.1 (OS X built in)
> > and Aquamacs (22.3.1).
> >
> > Can anyone shed light?
> >

I think I have seen similar behaviour under earlier versions of R/ESS.
Your example above does not do it for me, but if I add a bit more on the
end I get the freeze (ESS 5.5, R-2.9.2, Vincent Goulet's Emacs 23.1
modified 3, Windows Vista):

options(error=recover)
library(datasets)
avg <- by(warpbreaks, list(warpbreaks$wool, warpbreaks$tnsion),
function(x)mean(x$breaks)))
#previous line generates error due to typo
print(avg)
ff <- function()
  {
}

Execute the above with <ctrl>C <ctrl>R, and everything hangs. The
solution for me is <ctrl>G, at which point things unstick nicely and I
get the (different) prompt ("Selection:") issued by recover. (<ctrl>G is
also useful in other circumstances, such as invoking some operation
which takes a long time to complete.)

HTH

Keith

Keith Ponting
Aurix Ltd, Malvern WR14 3SZ  UK



More information about the ESS-help mailing list