Using RooClassFactory causes segmentation fault

I am using Root version 5.12.

I have been trying to create a new p.d.f class using the RooClassFactory method. Initially I tried making my own following the instructions in the manual. This gave me a segmentation error everytime I tried to run it. I then tried to follow the example in the manual exactly and I still get the same error!

Has anyone had the same problem?


root [0] .L RooMyPdf.cxx

RooFit v2.09 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2005 NIKHEF, University of California & Stanford University
All rights reserved, please read

root [1] RooRealVar x(“x”,“x”,-10,10);
root [2] RooRealVar alpha(“alpha”, “alpha”, 1.0,0.,10.);
root [3] RooMyPdf g(“g”,“compiled class g”, x, alpha);

*** Break *** segmentation violation
Generating stack trace…
0xb7a110c6 in TList::FindObject(TObject const*) const + 0xe from /system/packages/root_SL4/lib/
0xb5dfd558 in RooAbsArg::registerProxy(RooArgProxy&) + 0x28 from /system/packages/root_SL4/lib/
0xb5e37f69 in RooArgProxy::RooArgProxy(char const*, char const*, RooAbsArg*, RooAbsArg&, bool, bool, bool) + 0xd7 from /system/packages/root_SL4/lib/
0xb5ee99d7 in RooRealProxy::RooRealProxy(char const*, char const*, RooAbsArg*, RooAbsReal&, bool, bool, bool) + 0x35 from /system/packages/root_SL4/lib/
RooMyPdf.h (1.36 KB)
RooMyPdf.cxx (1.49 KB)