Seg violation while using RooRandomizeParamMCSModule::sampleGaussian to smear observable while generating toys from a pdf

Hello everyone,

I’d like to smear one observable while generating toys from a pdf.

I tried to follow the example from the roofit tutorial ( https://root.cern.ch/root/html/tutorials/roofit/rf801_mcstudy.C.html ). RooRandomizeParamMCSModule::sampleUniform works fine, but whenever I try to use sampleGaussian instead, I get a seg violation.

This is the small dummy script I try to run:

import ROOT as r
import RooFit as rf

# My dummy variable
x = r.RooRealVar( 'x', 'x', 0., 10.)

# Construct dummy model
mean = r.RooRealVar( 'mean', 'mean', -1., 1. )
sigma = r.RooRealVar( 'sigma', 'sigma', .1, .2 )
gauss = r.RooGaussian( 'gauss', 'gauss', x, mean, sigma )

nsig = r.RooRealVar( 'nsig', 'nsig', 0., 10000. )
model = r.RooExtendPdf( 'model', 'model', gauss, nsig )

# Create manager
mc_study = r.RooMCStudy( model, r.RooArgSet(x), rf.Binned(r.kTRUE), rf.Silence(), rf.Extended(), rf.FitOptions( rf.Save(r.kTRUE), rf.PrintEvalErrors(0) ) )

# Smear x
randModule = r.RooRandomizeParamMCSModule()
randModule.sampleGaussian( x, 0., 1.)

mc_study.addModule(randModule)

# Generate and fit toys
mc_study.generateAndFit(10, 1000)

I get the following error:

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================

Thread 3 (Thread 0x7febec773700 (LWP 15127)):
#0  0x00007febf86cca5e in pthread_cond_timedwait

GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007febf8c039e5 in PyEval_RestoreThread ()
#2  0x00007febedef922b in pysqlite_step () from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/python3.6/lib-dynload/_sqlite3.cpython-36m-x86_64-linux-gnu.so
#3  0x00007febedefc2dd in _pysqlite_query_execute () from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/python3.6/lib-dynload/_sqlite3.cpython-36m-x86_64-linux-gnu.so
#4  0x00007febf8c1286f in PyCFunction_Call ()
#5  0x00007febf8c0f69e in PyObject_Call ()
#6  0x00007febedef5bc0 in pysqlite_connection_execute () from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/python3.6/lib-dynload/_sqlite3.cpython-36m-x86_64-linux-gnu.so
#7  0x00007febf8c0f7d1 in _PyCFunction_FastCallDict ()
#8  0x00007febf8c9f17c in call_function ()
#9  0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#10 0x00007febf8c9900b in fast_function ()
#11 0x00007febf8c9f255 in call_function ()
#12 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#13 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#14 0x00007febf8c9ac66 in function_call ()
#15 0x00007febf8c0f69e in PyObject_Call ()
#16 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#17 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#18 0x00007febf8c9924f in fast_function ()
#19 0x00007febf8c9f255 in call_function ()
#20 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#21 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#22 0x00007febf8c9924f in fast_function ()
#23 0x00007febf8c9f255 in call_function ()
#24 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#25 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#26 0x00007febf8c9ac66 in function_call ()
#27 0x00007febf8c0f69e in PyObject_Call ()
#28 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#29 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#30 0x00007febf8c9924f in fast_function ()
#31 0x00007febf8c9f255 in call_function ()
#32 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#33 0x00007febf8c9900b in fast_function ()
#34 0x00007febf8c9f255 in call_function ()
#35 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#36 0x00007febf8c9900b in fast_function ()
#37 0x00007febf8c9f255 in call_function ()
#38 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#39 0x00007febf8c9965b in _PyFunction_FastCallDict ()
#40 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#41 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#42 0x00007febf8c0f69e in PyObject_Call ()
#43 0x00007febf8d0fd16 in t_bootstrap ()
#44 0x00007febf86c8aa1 in start_thread () from /lib64/libpthread.so.0
#45 0x00007febf8415bcd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7febeae9b700 (LWP 15416)):
#0  0x00007febf86cca5e in pthread_cond_timedwait

GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007febf8c039e5 in PyEval_RestoreThread ()
#2  0x00007febf8c5c59c in time_sleep ()
#3  0x00007febf8c0f855 in _PyCFunction_FastCallDict ()
#4  0x00007febf8c9f17c in call_function ()
#5  0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#6  0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#7  0x00007febf8c9ac66 in function_call ()
#8  0x00007febf8c0f69e in PyObject_Call ()
#9  0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#10 0x00007febf8c9900b in fast_function ()
#11 0x00007febf8c9f255 in call_function ()
#12 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#13 0x00007febf8c9900b in fast_function ()
#14 0x00007febf8c9f255 in call_function ()
#15 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#16 0x00007febf8c9965b in _PyFunction_FastCallDict ()
#17 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#18 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#19 0x00007febf8c0f69e in PyObject_Call ()
#20 0x00007febf8d0fd16 in t_bootstrap ()
#21 0x00007febf86c8aa1 in start_thread () from /lib64/libpthread.so.0
#22 0x00007febf8415bcd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7febf8f8b700 (LWP 15006)):
#0  0x00007febf83d986d in waitpid () from /lib64/libc.so.6
#1  0x00007febf836b479 in do_system () from /lib64/libc.so.6
#2  0x00007febf836b7b0 in system () from /lib64/libc.so.6
#3  0x00007febe866f7bf in TUnixSystem::StackTrace (this=0x7febfadf7770) at /conda/conda-bld/work/core/unix/src/TUnixSystem.cxx:2301
#4  0x00007febe867133c in TUnixSystem::DispatchSignals (this=0x7febfadf7770, sig=kSigSegmentationViolation) at /conda/conda-bld/work/core/unix/src/TUnixSystem.cxx:3539
#5  <signal handler called>
#6  RooRandomizeParamMCSModule::processBeforeGen (this=0x7febffe4ced0) at /conda/conda-bld/work/roofit/roofitcore/src/RooRandomizeParamMCSModule.cxx:394
#7  0x00007febd0bfab5f in RooMCStudy::run (this=this
entry=0x7fec02fbdb60, doGenerate=doGenerate
entry=true, DoFit=DoFit
entry=true, nSamples=9, nSamples
entry=10, nEvtPerSample=nEvtPerSample
entry=1000, keepGenData=keepGenData
entry=false, asciiFilePat=asciiFilePat
entry=0x0) at /conda/conda-bld/work/roofit/roofitcore/src/RooMCStudy.cxx:511
#8  0x00007febd0bfb43f in RooMCStudy::generateAndFit (this=0x7fec02fbdb60, nSamples=10, nEvtPerSample=1000, keepGenData=<optimized out>, asciiFilePat=0x0) at /conda/conda-bld/work/roofit/roofitcore/src/RooMCStudy.cxx:663
#9  0x00007febf897d093 in ?? ()
#10 0x00007fec02fbdf38 in ?? ()
#11 0x00007fff207df17f in ?? ()
#12 0x00007fff207df0b0 in ?? ()
#13 0x00000002ffb6e2a0 in ?? ()
#14 0x00007fec02fbdb60 in ?? ()
#15 0x000000000000006c in ?? ()
#16 0x00007fff207df09f in ?? ()
#17 0x00007febea170e01 in FastCall (method=method
entry=140651584217760, args_=args_
entry=0x7fff207df600, self=self
entry=0x7fec02fbdb60, result=result
entry=0x7fff207df17f) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#18 0x00007febea17182c in CallT<unsigned char> (args=0x7fff207df600, self=0x7fec02fbdb60, method=method
entry=140651584217760) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#19 Cppyy::CallB (method=method
entry=140651584217760, self=self
entry=0x7fec02fbdb60, args=args
entry=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/Cppyy.cxx:432
#20 0x00007febea17592f in GILCallB (ctxt=0x7fff207df600, self=0x7fec02fbdb60, method=140651584217760) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#21 PyROOT::TBoolExecutor::Execute (this=<optimized out>, method=140651584217760, self=0x7fec02fbdb60, ctxt=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/Executors.cxx:105
#22 0x00007febea18db4c in PyROOT::TMethodHolder::CallFast (ctxt=0x7fff207df600, offset=0, self=0x7fec02fbdb60, this=0x7febffb76190) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#23 PyROOT::TMethodHolder::CallSafe (this=this
entry=0x7febffb76190, self=0x7fec02fbdb60, offset=0, ctxt=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/TMethodHolder.cxx:109
#24 0x00007febea18c5f5 in PyROOT::TMethodHolder::Execute (this=0x7febffb76190, self=<optimized out>, offset=<optimized out>, ctxt=<optimized out>) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#25 0x00007febea18b843 in PyROOT::TMethodHolder::Call (this=0x7febffb76190, self=
0x7febccf6dd08: 0x7febea4980a0, args=<optimized out>, kwds=<optimized out>, ctxt=0x7fff207df600) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#26 0x00007febea186969 in PyROOT::(anonymous namespace)::mp_call (pymeth=0x7febccf6dcf8, args=0x7febccf6e908, kwds=0x0) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#27 0x00007febf8c0fa7b in _PyObject_FastCallDict ()
#28 0x00007febf8c9f2ce in call_function ()
#29 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#30 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#31 0x00007febf8c9aadc in PyEval_EvalCode ()
#32 0x00007febf8cbf5cb in builtin_exec ()
#33 0x00007febf8c0f7d1 in _PyCFunction_FastCallDict ()
#34 0x00007febf8c9f17c in call_function ()
#35 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#36 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#37 0x00007febf8c9924f in fast_function ()
#38 0x00007febf8c9f255 in call_function ()
#39 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#40 0x00007febf8c98871 in _PyEval_EvalCodeWithName ()
#41 0x00007febf8c9924f in fast_function ()
#42 0x00007febf8c9f255 in call_function ()
#43 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#44 0x00007febf8c9867e in _PyEval_EvalCodeWithName ()
#45 0x00007febf8c9924f in fast_function ()
#46 0x00007febf8c9f255 in call_function ()
#47 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#48 0x00007febf8c9a37e in PyEval_EvalCodeEx ()
#49 0x00007febf8c9ac66 in function_call ()
#50 0x00007febf8c0f69e in PyObject_Call ()
#51 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#52 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#53 0x00007febf8c9924f in fast_function ()
#54 0x00007febf8c9f255 in call_function ()
#55 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#56 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#57 0x00007febf8c99917 in _PyFunction_FastCallDict ()
#58 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#59 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#60 0x00007febf8c0f69e in PyObject_Call ()
#61 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#62 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#63 0x00007febf8c9924f in fast_function ()
#64 0x00007febf8c9f255 in call_function ()
#65 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#66 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#67 0x00007febf8c9aadc in PyEval_EvalCode ()
#68 0x00007febf8cbf5cb in builtin_exec ()
#69 0x00007febf8c0f7d1 in _PyCFunction_FastCallDict ()
#70 0x00007febf8c9f17c in call_function ()
#71 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#72 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#73 0x00007febf8c9924f in fast_function ()
#74 0x00007febf8c9f255 in call_function ()
#75 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#76 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#77 0x00007febf8c9924f in fast_function ()
#78 0x00007febf8c9f255 in call_function ()
#79 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#80 0x00007febf8c9867e in _PyEval_EvalCodeWithName ()
#81 0x00007febf8c9924f in fast_function ()
#82 0x00007febf8c9f255 in call_function ()
#83 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#84 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#85 0x00007febf8c9924f in fast_function ()
#86 0x00007febf8c9f255 in call_function ()
#87 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#88 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#89 0x00007febf8c9924f in fast_function ()
#90 0x00007febf8c9f255 in call_function ()
#91 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#92 0x00007febf8c9900b in fast_function ()
#93 0x00007febf8c9f255 in call_function ()
#94 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#95 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#96 0x00007febf8c99917 in _PyFunction_FastCallDict ()
#97 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#98 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#99 0x00007febf8c0f69e in PyObject_Call ()
#100 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#101 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#102 0x00007febf8c9924f in fast_function ()
#103 0x00007febf8c9f255 in call_function ()
#104 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#105 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#106 0x00007febf8c9aadc in PyEval_EvalCode ()
#107 0x00007febf8d15be4 in run_mod ()
#108 0x00007febf8d15fe1 in PyRun_FileExFlags ()
#109 0x00007febf8d161e4 in PyRun_SimpleFileExFlags ()
#110 0x00007febf8d19cbf in Py_Main ()
#111 0x00007febf8be0dbe in main ()
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6  RooRandomizeParamMCSModule::processBeforeGen (this=0x7febffe4ced0) at /conda/conda-bld/work/roofit/roofitcore/src/RooRandomizeParamMCSModule.cxx:394
#7  0x00007febd0bfab5f in RooMCStudy::run (this=this
entry=0x7fec02fbdb60, doGenerate=doGenerate
entry=true, DoFit=DoFit
entry=true, nSamples=9, nSamples
entry=10, nEvtPerSample=nEvtPerSample
entry=1000, keepGenData=keepGenData
entry=false, asciiFilePat=asciiFilePat
entry=0x0) at /conda/conda-bld/work/roofit/roofitcore/src/RooMCStudy.cxx:511
#8  0x00007febd0bfb43f in RooMCStudy::generateAndFit (this=0x7fec02fbdb60, nSamples=10, nEvtPerSample=1000, keepGenData=<optimized out>, asciiFilePat=0x0) at /conda/conda-bld/work/roofit/roofitcore/src/RooMCStudy.cxx:663
#9  0x00007febf897d093 in ?? ()
#10 0x00007fec02fbdf38 in ?? ()
#11 0x00007fff207df17f in ?? ()
#12 0x00007fff207df0b0 in ?? ()
#13 0x00000002ffb6e2a0 in ?? ()
#14 0x00007fec02fbdb60 in ?? ()
#15 0x000000000000006c in ?? ()
#16 0x00007fff207df09f in ?? ()
#17 0x00007febea170e01 in FastCall (method=method
entry=140651584217760, args_=args_
entry=0x7fff207df600, self=self
entry=0x7fec02fbdb60, result=result
entry=0x7fff207df17f) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#18 0x00007febea17182c in CallT<unsigned char> (args=0x7fff207df600, self=0x7fec02fbdb60, method=method
entry=140651584217760) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#19 Cppyy::CallB (method=method
entry=140651584217760, self=self
entry=0x7fec02fbdb60, args=args
entry=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/Cppyy.cxx:432
#20 0x00007febea17592f in GILCallB (ctxt=0x7fff207df600, self=0x7fec02fbdb60, method=140651584217760) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#21 PyROOT::TBoolExecutor::Execute (this=<optimized out>, method=140651584217760, self=0x7fec02fbdb60, ctxt=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/Executors.cxx:105
#22 0x00007febea18db4c in PyROOT::TMethodHolder::CallFast (ctxt=0x7fff207df600, offset=0, self=0x7fec02fbdb60, this=0x7febffb76190) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#23 PyROOT::TMethodHolder::CallSafe (this=this
entry=0x7febffb76190, self=0x7fec02fbdb60, offset=0, ctxt=0x7fff207df600) at /conda/conda-bld/work/bindings/pyroot/src/TMethodHolder.cxx:109
#24 0x00007febea18c5f5 in PyROOT::TMethodHolder::Execute (this=0x7febffb76190, self=<optimized out>, offset=<optimized out>, ctxt=<optimized out>) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#25 0x00007febea18b843 in PyROOT::TMethodHolder::Call (this=0x7febffb76190, self=
0x7febccf6dd08: 0x7febea4980a0, args=<optimized out>, kwds=<optimized out>, ctxt=0x7fff207df600) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#26 0x00007febea186969 in PyROOT::(anonymous namespace)::mp_call (pymeth=0x7febccf6dcf8, args=0x7febccf6e908, kwds=0x0) from /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/libPyROOT.so
#27 0x00007febf8c0fa7b in _PyObject_FastCallDict ()
#28 0x00007febf8c9f2ce in call_function ()
#29 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#30 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#31 0x00007febf8c9aadc in PyEval_EvalCode ()
#32 0x00007febf8cbf5cb in builtin_exec ()
#33 0x00007febf8c0f7d1 in _PyCFunction_FastCallDict ()
#34 0x00007febf8c9f17c in call_function ()
#35 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#36 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#37 0x00007febf8c9924f in fast_function ()
#38 0x00007febf8c9f255 in call_function ()
#39 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#40 0x00007febf8c98871 in _PyEval_EvalCodeWithName ()
#41 0x00007febf8c9924f in fast_function ()
#42 0x00007febf8c9f255 in call_function ()
#43 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#44 0x00007febf8c9867e in _PyEval_EvalCodeWithName ()
#45 0x00007febf8c9924f in fast_function ()
#46 0x00007febf8c9f255 in call_function ()
#47 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#48 0x00007febf8c9a37e in PyEval_EvalCodeEx ()
#49 0x00007febf8c9ac66 in function_call ()
#50 0x00007febf8c0f69e in PyObject_Call ()
#51 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#52 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#53 0x00007febf8c9924f in fast_function ()
#54 0x00007febf8c9f255 in call_function ()
#55 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#56 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#57 0x00007febf8c99917 in _PyFunction_FastCallDict ()
#58 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#59 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#60 0x00007febf8c0f69e in PyObject_Call ()
#61 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#62 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#63 0x00007febf8c9924f in fast_function ()
#64 0x00007febf8c9f255 in call_function ()
#65 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#66 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#67 0x00007febf8c9aadc in PyEval_EvalCode ()
#68 0x00007febf8cbf5cb in builtin_exec ()
#69 0x00007febf8c0f7d1 in _PyCFunction_FastCallDict ()
#70 0x00007febf8c9f17c in call_function ()
#71 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#72 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#73 0x00007febf8c9924f in fast_function ()
#74 0x00007febf8c9f255 in call_function ()
#75 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#76 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#77 0x00007febf8c9924f in fast_function ()
#78 0x00007febf8c9f255 in call_function ()
#79 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#80 0x00007febf8c9867e in _PyEval_EvalCodeWithName ()
#81 0x00007febf8c9924f in fast_function ()
#82 0x00007febf8c9f255 in call_function ()
#83 0x00007febf8cc2968 in _PyEval_EvalFrameDefault ()
#84 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#85 0x00007febf8c9924f in fast_function ()
#86 0x00007febf8c9f255 in call_function ()
#87 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#88 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#89 0x00007febf8c9924f in fast_function ()
#90 0x00007febf8c9f255 in call_function ()
#91 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#92 0x00007febf8c9900b in fast_function ()
#93 0x00007febf8c9f255 in call_function ()
#94 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#95 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#96 0x00007febf8c99917 in _PyFunction_FastCallDict ()
#97 0x00007febf8c0fc5f in _PyObject_FastCallDict ()
#98 0x00007febf8c148c3 in _PyObject_Call_Prepend ()
#99 0x00007febf8c0f69e in PyObject_Call ()
#100 0x00007febf8cc3218 in _PyEval_EvalFrameDefault ()
#101 0x00007febf8c98354 in _PyEval_EvalCodeWithName ()
#102 0x00007febf8c9924f in fast_function ()
#103 0x00007febf8c9f255 in call_function ()
#104 0x00007febf8cc1bba in _PyEval_EvalFrameDefault ()
#105 0x00007febf8c99d39 in PyEval_EvalCodeEx ()
#106 0x00007febf8c9aadc in PyEval_EvalCode ()
#107 0x00007febf8d15be4 in run_mod ()
#108 0x00007febf8d15fe1 in PyRun_FileExFlags ()
#109 0x00007febf8d161e4 in PyRun_SimpleFileExFlags ()
#110 0x00007febf8d19cbf in Py_Main ()
#111 0x00007febf8be0dbe in main ()
===========================================================


---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
~/ewp-Bd2Kstee-AngAna/analysis/phiStudy/pytest.py in <module>()
    116 
    117 # Generate and fit toys
--> 118 mc_study.generateAndFit(10, 1000)

SystemError: bool RooMCStudy::generateAndFit(int nSamples, int nEvtPerSample = 0, bool keepGenData = kFALSE, const char* asciiFilePat = 0) =>
    problem in C++; program state has been reset

Any idea what I’m doing wrong ?
Thx for your help !

I got my answer: RooRandomizeParamMCSModule::sampleUniform is broken ( it has been reported here https://github.com/root-project/root/pull/1379 )

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.