I’m working on a macro in which I define a TTree and fill it with events.
My problem is that when I execute the macro the first time, it works fine. The second time, I have a " *** Break *** bus error". I have to quit root to get rid of the problem, but it’s not really practical…
Then, I tried to execute tutorials/tree/tree4.C. I have exactly the same problem: the first time it works, and the second time, it gives a “bus error”.
I’m using the binary package
ROOT 5.22/00 (trunk@26997, De 18 2008, 10:17:00 on macosx)
gcc 4.0.1, Mac OS X.5.6, Intel.
tree4.C was mis-using the Event class (from $ROOTSYS/test/Event.h) which lead to the crash. Unless your script is also using the Event class, your problem is likely very different. The easiest way to track down those issue is to use ‘valgrind’ (available only on linux) or a memory checker tools.
At the very least, you ought to attach a debugger to your root session and see what the stack trace is.