TTree Segmentation Violation

Hi.
I was running a routine and obtained segmention violation after a TTree creation. I therefore reduced the file to its real bones.

Could anyone explain me because when digiting

[color=#FF0000] .L TestNotWorking.C++
run()
[/color]

segmentation violation is obtained, while by digiting

[color=#FF0000].L TestWorking.C++
run()[/color]

no problem is given, please?

The same applies for the “Bis” version.
I need the exit(0) statement for checking that everything works fine each time I introduce a small change…

Thanks a lot,
bye,
Fra
TestWorkingBis.C (651 Bytes)
TestNotWorkingBis.C (714 Bytes)
TestNotWorking.C (226 Bytes)
TestWorking.C (346 Bytes)

Replace “exit(0);” with “{delete f; exit(0);}”.

Thanks!
Bye,
Fra

Hi,

Instead of directly calling exit, consider calling gSystem->Exit( value );
to allow for more orderly tear down of the ROOT objects.

Cheers,
Philippe.