Segmentation violation

Dear ROOT experts,

I met segmentation violation when I run the attached script. It took me two days and can’t figure out what the problem is. Could you help me out? I try it with root debugger, no
segmentation violation shows up.

Thank you very much for your kind help in advance.

makeVarBinSpectra.C (4.1 KB)

Hi Zhongbao,
I checked your macro with $ROOTSYS/tutorials/hsimple.root
(win32gdk, ROOT 3.10.01) as
root []makeVarBinSpectra(“hsimple.root”,“hpx”)

BTW, it would be good to see your actual root file.

Everything is OK, without seg.violation.

Regards. Valeriy

Thanks a lot for your help. The problem has been solved. That’s a very stupid mistake, I am really shame of it.

Best regards,