Problem using RooMCStudy

I’m trying to execute this piece of code in root v 5.14 with RooFit v2.10 and I get a Seg Fault when generating. I used the exemple presented here : … lide8.html
Since the creation of the document, has anything changed ?

Thanks in advance,


#include <RooGaussModel.h>
#include <RooAbsReal.h>
#include <RooMCStudy.h>

using namespace RooFit;

int mcs() {

  RooRealVar x("x","x",-5,5);
  RooRealVar mean("mean","mean",0);
  RooRealVar sigma("sigma","sigma",2);
  RooGaussian gauss("gauss","gaussian PDF",x,mean,sigma);

  RooMCStudy* mgr = new RooMCStudy(gauss,gauss,x,"v");

 return 0;

well, i can answer my self

i need to not repet the Pdf “gauss” in the expression two times.