Hello.
Two issues of note.
The first is the most important, and it has two parts. For some reason, when the ROOT interpreter breaks, 60-70% it tells me what is wrong in a nice fashion, usually by pointing out the function that has the problem.
The other 40-30% it segfaults. Usually in the wrong place.
Don’t get me wrong, I don’t think segfaults are necessarily bad things, but they are when you are using an interpreter. A segfault, to me, indicates that the interpreter did something wrong, not the program. Yet most of the time, the problem is in my program, not the interpreter.
This has led to other problems, like breaking the ssh pipe output (Character echo no longer works). Another issue for another time.
Perhaps even more disturbingly, these faults occur after where the real problem is. If I’m to follow the output of the program, and then omit the offending line, then rerun. The offending line is well before the point of stopped execution.
So let me come to the point. How do I avoid this? What kind of serious debugging facilities do I have available to me, because given the above issue, scattered cout/cerr statements don’t work. Maybe more importantly, since 60-70 things work nicely, how do I go about avoiding the segfaults?
Secondly, allow to me to ask why standard C++ objects cause so many problems. The most recent problem of the above variety that I had was caused by a ifstream object, which for all I can tell, was called and used correctly.
sprintf(file,"%s/netMeyer1024_L%1d.dat",nodedir,i);
ifstream test(file,fstream::in)
if(!test){
...
}
Now, I may have done something incorrectly, but I can’t tell because the interpreter won’t tell me that.
I’m sorry if I sound accusing, but I’m frustrated with the lack of options. Any help/advice would be appreciated. Thanks.[/code]