vector<TF1*> crash with PyROOT 6.08

Dear all,

I’m having issues with vector<TF1*> object used with PyROOT in 6.08/00.
In short when I try to access elements in a vector<TF1*>, I see a crash if these elements have been inserted via a pointer defined in a C++ class.
This reproduces the crash :

struct AA {
  AA(){ f= new TF1("test", "x+1",0,10);}
  TF1* f;

struct BB {
  std::vector<TF1*> vec;
  void add(AA &a){vec.push_back(a.f);}

Then doing :

>>>>>> a=ROOT.AA()
>>>>>> b=ROOT.BB()
>>>>>> b.add(a)
>>>>>> b.vec[0] # works as expected !
<ROOT.TF1 object ("test") at 0x398f040>
>>>>>> b.vec.push_back(a.f)
>>>>>> b.vec[1]

Is it expected ?




thanks for reporting the issue. I propose to follow this item on our bug tracker:


A fix has been committed 0dfbc85 to master, 6.08 and 6.10 branches.

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