Strange problem with TF1

Dear experts,

I have a very strange problem with TF1 and I am a little bit confused about it. (I am using root v.5.34.00)

I have this code (here: https://github.com/lbrianza/iMCP_TB/blob/master/TB/bin/analyzer.cpp ) that works perfectly, except for this fact: at the return(0), it gives me a “break: segmentation violation”.
(no other errors: the terminal simply remains stuck).

After a lot of debug, I have found the problematic line: (line 162)

The strange thing is that, if I change this line with:

everything goes right, and the segmentation violation diseappears. But, when I call the TF1 constructor with the name, the problem appears again. I have also tried different names/functions:

or similar, but the “break: segmentation violation” is still there.

any ideas about this issue?
thank you very much for the help,
Luca

Try to replace: gSystem->Load("libTree"); with: TApplication a("a", 0, 0); if (argc < 7) return 1;

Hi,

[quote=“Wile E. Coyote”]Try to replace: gSystem->Load("libTree"); with: TApplication a("a", 0, 0); if (argc < 7) return 1;[/quote]
done, but I still get the “segmentation violation”. The only difference now is that the terminal is not stuck anymore.

Luca

[root.cern.ch/phpBB3/viewtopic.p … 623#p78623](Segmentation Fault depending on linux distribution