I have come across a very strange behaviour this afternoon.
I was trying to read histograms from a root file with statements like.
I am doing this in a macro which I compile with .L macro.C+. It compiles without errors. As soon as I want access certain histograms in my macro, even with a simple ->Print(), I get a segmentation fault:
*** Break *** segmentation violation
Attaching to program: /proc/20335/exe, process 20335
[Thread debugging using libthread_db enabled]
[New Thread 0xb70b16c0 (LWP 20335)]
0xb7f36410 in __kernel_vsyscall ()
error detected on stdin
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Exactly the same code works if I run it interactively in CINT without compiling. It seems to me that only histograms with underscores in their name are affected!
I use ROOT version 5.18/00 on a linux machine. Is this a known bug?
I am really puzzled by now.
First things I did today: check again, it crashed like yesterday.
I recreated the input file with a different name containing the same histograms and it runs !
changing back to the old file (UNDO in emacs!!) runs as well!!!
(Do you have any idea?)
anyways, this is what happened before:
In the old file the histograms that make my code crash existed as well… I could look at them in a TBrowser and Draw() them, and I could even do everything I do in the compiled macro in CINT command line without any problems.
If I find out more about this and if I can reproduce it I will let you know…
I have no clue what happened, I spent hours yesterday. It’s not possible that there was a typo in the filename (root didn’t complain, I used simple undo in emacs).