Skip to content

random text added to names (bug with 2.10.0?)

2 messages · Johann Hibschman, Peter Dalgaard

#
I'm using 2.10.0 on Linux (64 bit), and I just noticed that random
numbers are occasionally added to the text of names in vectors. It's
happened to me in two separate, long-running R sessions, but I can't
find a way to reproduce it in a smaller setting.

The code I'm using is
rmse mdae.1413751         mnae           cv           r2
 0.023171639  0.007206221  0.012374469  1.259498479  0.385234756
function (fit, ds) {
  run.diagnostics(mdl.run(fit, ds))
}
function (ds) {
  c(rmse=root.mean.squared.error(ds),
    mdae=median.absolute.error(ds),
    mnae=mean.absolute.error(ds),
    cv=coefficient.of.variation(ds),
    r2=coefficient.of.determination(ds))
}

The problem is that extra ".1413751" that's mysteriously being added
to the mdae name.

Am I doing something obviously wrong, or is this a bug? I still have
the two sessions running, if there are any diagnostics would help.

Cheers,
Johann
3 days later
#
Johann Hibschman wrote:
Definitely a bug. Presumably memory corruption somewhere.

Is it persistent? I.e., if you do the run.diagnostics() bit again, do
you get the same corrupted name? If so, I would suspect that something
is changing the function itself (which you cannot see unless you clear
its "source" attribute).

We do say "minimal, reproducible" code, but if push comes to shove,
"reproducible" is the important bit. If you can replicate the issue and
run the code under valgrind (the gory details of doing that are in
Writing R Extensions) then you could post back its messages, and to
those in the know, it might point the finger at the guilty code.