Problem with histo in the latest ROOT version (5.26)

Hello,
with the lastest ROOT version, my subroutine crashes with next error message:

Error in <TH2F:DoProjection>: Histogram with name must be a TH1D and is a TH2F *** Break *** segmentation violation

My subroutine worked fine with previous version. I do not know exactly what cause crash because if I recompile subroutine, it works without crashing. I can send you my subroutine (it is a bit long)

Hi,

in TH2::ProjectionX (or ProjectionY) you are using a name of an already existing histogram, you should use a new name. You can use an existing only if it is compatible. See the NOTE in root.cern.ch/root/htmldoc/TH2.ht … rojectionX

In case of an error a NULL pointer is returned and your program it will crash if you will use it in afterwards

Best Regards

Lorenzo