Problem with RooDataSet::addColumn

Hi,

I’m using ROOT v5.26, and I’m getting a crash in RooDataSet::addColumn following RooAbsPdf::createPlotProjection. (I.e., the formula describing what column to add to the RooDataSet is produced by RooAbsPdf::createPlotProjection, then I try to add that column, and I get the crash below.) The traceback is as follows:

Program received signal SIGSEGV, Segmentation fault.
0x084ccc79 in RooLinkedList::At(int) const ()
(gdb) where
#0 0x084ccc79 in RooLinkedList::At(int) const ()
#1 0x0851b40e in RooSimultaneous::analyticalIntegralWN(int, RooArgSet const*, char const*) const ()
#2 0x08219fd0 in RooAddPdf::analyticalIntegralWN(int, RooArgSet const*, char const*) const ()
#3 0x08509c61 in RooRealIntegral::evaluate() const ()
#4 0x08204aab in RooAbsReal::traceEval(RooArgSet const*) const ()
#5 0x08204c7e in RooAbsReal::getVal(RooArgSet const*) const ()
#6 0x084b0f05 in RooFormula::DefinedValue(int) ()
#7 0x012ffa90 in TFormula::EvalParFast(double const*, double const*) ()
from /afs/slac.stanford.edu/g/babar/dist/releases/24.5.6/shlib/Linux26SL5_i386_gcc412/ldlink/libHist.so
#8 0x084b26ee in TFormula::EvalPar(double const*, double const*) ()
#9 0x084b1202 in RooFormula::eval(RooArgSet const*) ()
#10 0x084b2ac8 in RooFormulaVar::evaluate() const ()
#11 0x08204aab in RooAbsReal::traceEval(RooArgSet const*) const ()
#12 0x08204c7e in RooAbsReal::getVal(RooArgSet const*) const ()
#13 0x084b2a1e in RooFormulaVar::getVal(RooArgSet const*) const ()
#14 0x080bd10b in RooAbsReal::syncCache (this=0x1aa6ab50, set=0x182392f0)
at /afs/slac.stanford.edu/g/babar/dist/releases/24.5.6/tmp/Linux26SL5_i386_gcc412/RooFitCore/RooAbsReal.hh:204
#15 0x085290ad in RooTreeData::addColumn(RooAbsArg&) ()
#16 0x0823d67e in RooDataSet::addColumn(RooAbsArg&) ()
#17 0x08073ac2 in rarMLFitter::getLLRDataset (this=0xbfffd2e8, theData=0xde611e0, LLR=0x18238ab8)
at /a/wain058/AWG66/LeptBc/jalbert/analysis-52/RooRarFit/rarMLFitter.cc:2830
#18 0x0808183b in rarMLFitter::doProjPlot (this=0xbfffd2e8, projData=0xde611e0, theVar=0x8a06c68, plotList=…)
at /a/wain058/AWG66/LeptBc/jalbert/analysis-52/RooRarFit/rarMLFitter.cc:3036
#19 0x0807f84f in rarMLFitter::run (this=0xbfffd2e8) at /a/wain058/AWG66/LeptBc/jalbert/analysis-52/RooRarFit/rarMLFitter.cc:5540
#20 0x0805af38 in main (argc=Cannot access memory at address 0x6) at /a/wain058/AWG66/LeptBc/jalbert/analysis-52/RooRarFit/rarFit.cc:184
(gdb) quit

A snippet of code from right before this crash occurs is:

RooPlot *rarMLFitter::doProjPlot(RooDataSet *projData, RooRealVar *theVar,
TList &plotList)
{
RooArgSet projVarSet;
projVarSet.add(*theVar);
RooArgSet depVarSet(_fObsSet); // _fObsSet is a RooArgSet of observables
depVarSet.remove(projVarSet, kFALSE, kTRUE);
const RooAbsReal *theSProj=_theSPdf->createPlotProjection(depVarSet, projVarSet);
const RooAbsReal *theBProj=theBPdf->createPlotProjection(depVarSet, projVarSet);
RooArgList projPdfList(*theSProj, *theBProj, “Projected Pdf List”);
TString formulaStr="@0/(@0+@1)";
TString funcName="lRatioFunc
"+varName;
RooFormulaVar *LLR = new RooFormulaVar(funcName, “LRatio Func”, formulaStr, projPdfList);
RooDataSet *retDS = new RooDataSet(*projData,Form("%s_wLLR", projData->GetName()));
setColLimits(retDS);
retDS->addColumn(*LLR);

(crash)

Any ideas what might perhaps be causing this, or what can be done to fix it? – or even anything else I can do to help debug the issue? (For example, using the trivial formula “@0” with either theSProj or theBProj gives an identical crash.) The above code has worked in many other situations (it is actually part of a package called RooRarFit, whose main author has unfortunately left the field), but in the present circumstance is giving the above crash deep in the bowels of RooFit. Any help would be very much appreciated.

Thanks very much in advance for assistance,
justin