Skip to content

"Error: bad value" problem

7 messages · Peter Dalgaard, Duncan Murdoch, Martyn Plummer

#
Ben Bolker wrote:
Probably not. The problem is to reproduce the error state in a way so 
that we can understand what is causing it.

I can debug this to
(gdb) bt
#0  Rf_error (format=0x8220c65 "bad value") at 
../../../R/src/main/errors.c:704
#1  0x0805a924 in SETCDR (x=0x8f89348, y=0x9b276e8)
     at ../../../R/src/main/memory.c:2728
#2  0x0819fa46 in GrowList (l=0x951e8f4, s=<value optimized out>) at 
gram.y:958
#3  0x081a2a7b in xxvalue (v=0x8f89348, k=4, lloc=<value optimized out>)
     at gram.y:440

and the problem in GrowList is that CAR(l) is R_NilValue (==0x8f89348), 
which supposedly "cannot happen", and the thing that calls GrowList is 
something with srcrefs (DuncanM?).

Digging deeper probably has to wait till the weekend for my part. (The 
natural next step is figuring out how the R_NilValue got into that 
location, but I should try to sleep off this cold....)

I'm CCing r-devel on this. Can we move the discussion there?

  
    
#
On 17/12/2008 8:56 PM, Peter Dalgaard wrote:
I can probably take a look tomorrow.  I wasn't getting an error, but 
maybe I'll see the same corruption if I watch it run.

Duncan Murdoch
#
On 17/12/2008 9:47 PM, Duncan Murdoch wrote:
I had time to see if I was getting a NilValue there tonight, and the 
answer was no, with the Windows RC.  I don't get the error in any 
version I've tried on Windows, though I can see it in 2.8.0 on MacOSX.

Duncan
#
This has all the hallmarks of a bug I found and fixed in R-devel
(r46998).  I did not port the patch over to the R release branch because
I could not reproduce the bug.

In R-devel, I was seeing problems with "make test-Segfault". This would
occasionally segfault, but most of the time would create the "bad value"
error, and of course would also run perfectly fine a lot of the time.
The error came from exactly the same place that Ben found.  It was due
to an invalid SrcRefs being used because SrcFile is not set to zero when
it should be.

I'll have a look and see if it is the same problem, or a close cousin.

Martyn
On Wed, 2008-12-17 at 22:07 -0500, Duncan Murdoch wrote:
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}
#
Martyn Plummer wrote:
Yes, this does appear to fix the issue. (Did you forget a NEWS file 
entry, though?)

It's a two-line change fixing a live bug, so it could go in 2.8.1 even 
in code freeze. The problem is that it is inside gram.y which will 
trigger some maintainer-mode activity, and did trip up my Fedora laptop 
slightly. Hmmmm....

	-p
#
On Thu, 2008-12-18 at 10:57 +0100, Peter Dalgaard wrote:
You mean this?

* Fixed obscure, poorly reproducible bug that nobody else has reported.

Anyway, it's the same bug. There is a call to parse() in plot.mmfit()
which generates a parse error.  This has been wrapped in a silent call
to try, so you never see the error message:

Error in parse(text = colnames(z)[seq(1, 2 * np, 2)]) : 
  unexpected numeric constant in "Parameter 1"

This error leaves the parser in a bad state.
Fedora 10 certainly won't let me do a maintainer mode build.  I leave it
in your hands.

M.
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}
#
Martyn Plummer wrote:
[....]
Now committed for 2.8.1.