Skip to content

Error message during debug (PR#6804)

2 messages · Duncan Murdoch, Peter Dalgaard

#
On Tue, 20 Apr 2004 13:48:43 -0400 (EDT), "Gabor Grothendieck"
<ggrothendieck@myway.com> wrote :
Confirmed.  It's not new in 1.9.0, it appears in 1.8.1 as well.  It
seems that a function body consisting of a single token triggers it.
I get a crash from this variation:

f <- function(x) 4

Maybe the system is trying to tell us that functions this simple don't
need debugging? ;-)

I'm sending this message to r-bugs to get it into the bug list (but I
won't have time to look at it until at least the weekend, if someone
else wants to fix it).

Duncan Murdoch
#
dmurdoch@pair.com writes:
Actually, ?debug says:

                             Currently you can only debug functions
     that have bodies enclosed in braces. This is a bug and will be
     fixed soon.

(and has probably said so for a very long time....)

I hadn't seen the segfault from debugging a constant before, but I
recently discovered that you *can* (sort of) debug a single-expression
function by setting options(error=recover).