Hi,
I’m having trouble in ROOT 5.32 writing out an object containing vectors of histograms. I get a segmentation fault when trying to write it out to a file. Also, I get a segmentation fault when trying to Clone the object.
I do have a Linkdef file specifying the new streamer method.
I’m pretty sure it’s the vector part causing the trouble because if I add //! after the vectors in my class, it saves fine. I thought it could be a problem with the directory of the histograms , but setting it to 0 or to the output TFile object doesn’t help.
Even more strangely, a member of the class I’m writing out is another user-defined class that has its own vector of TH2F’s and that writes out fine…
I have attached the output of a Dump() and Write() (and the ensuing seg fault) with gDebug =6 in hopes that it may be helpful.
The write of the object does NOT run in its own thread, but threads are used elsewhere in the program (including where the object I’m saving is created, but taking that out of a thread doesn’t help the problem).
I tried creating a simple example demonstrating the problem, but it doesn’t behave in the same way (crash on output). It does, however, crash when trying to read the object, which may be a related problem. That is also attached.
simpleExample.tar (10 KB)
dump.txt (146 KB)