About "Break Segmentation Violation" errors


I’m trying to solve a problem I have with two macros. Well, I have this error, but the program runs entirely to the final sentence. The problem I think is that these two macros interacts. The point is that when I run the macro that causes the error, alone, without loading before the other macro, don’t have the segmentation violation error. So, as this is not my first time in that situation, I’d like to tell me if anyone knows, how can I avoid these type of interactions between files. I execute “gROOT->Reset()” between the execution of the macros, but that obviously doesn’t produce any effect.

Can you help me?


Most likely the first macro corrupts something (memory over write of some sort). Try using valgrind (valgrind.kde.org) to pin point the issue.


Thank you! But now I don’t have much time to learn to use this program, but thank you for future situations. This situation is really a hell. Sometimes works, but sometimes no. And sometimes, I get an error of symbol not defined in the scope and really is not the case.

This situation is a hell!!!

I’m going on to try to resolve this problem.

Thanks again!


If your macros are not TOP SECRET information, the best way to fix problem (if you cannot do it yourself) - is to post these macros in this forum (if they do not require some huge input data files to work).
Guess-work is not the best way in programming.

No, 8) , my macros are not top secret, but yes, the first macro use a input file of 2 MB approx., so maybe is difficult to post here, and I ask here to know if there are a common cause for this problem, or a most probably problem that causes to occur the segmentation violation. But thank you. If I need I will post them, but it takes time to run, maybe three or four min. Again, thank you for your interest.

Compile them, you’ll get huge speed improvement.

[quote]I ask here to know if there are a common cause for this problem,[/quote]Not really … Your best bet is to compile your script and use valgrind to track the issue down.