Finally I found a short macro for reproduce the error!
The error message is slightly different, but I guess it’s caused by the same reason.
Here’s the short example for reproducing the error
First run, makeTF1.C:
void makeTF1() {
auto f = new TFile("func.root", "recreate");
auto a = new TF1("a", "x", 0, 10);
a -> Write();
}
Then, run readTF1.C:
void readTF1() {
auto f = new TFile("func.root");
auto fa = (TF1 *) f -> Get("a");
auto fca = (TF1 *) fa -> Clone("ca");
gROOT -> GetListOfFunctions() -> Add(fca);
}
Then, you can see the error message below:
Error in <TList::Delete>: A list is accessing an object (0x7fa4a73a7890) already deleted (list name = Functions)
$ root
-------------------------------------------------------------------
| Welcome to ROOT 6.15/01 http://root.cern.ch |
| (c) 1995-2018, The ROOT Team |
| Built for macosx64 |
| From heads/master@v6-13-04-190-g536073d9b0, May 24 2018, 16:04:00 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
-------------------------------------------------------------------
root [0] auto a = new TF1("a", "x", 0, 10);
root [1] gROOT -> GetListOfFunctions()->Add(a)
root [2] .q
Error in <TList::Delete>: A list is accessing an object (0x7ff153fc4bf0) already deleted (list name = Functions)
The question is: why do you need to add a TF1 to the list of functions ?
Thanks for the reply.
So, I just tested what you said and just using Get() method adds functions or TCutG into the list of functions or specials, respectively.
I didn’t know that.
I’m using ROOT with FairROOT package and ever since I updated from ROOT6.10 to 6.12, I’m getting errors related to TList.
Last time I posted this error TList::Clear(), you guys asked me a reproducible macro.
So, I thought this is it.
However, I guess it’s not…