I am having a problem with some code developed by my working group. The code uses several root libraries. It works pretty well in a server of our group using Debian GNU/Linux 6.0, with root 5.34/14, and gcc/g++ versions gcc (Debian 4.4.5-8) 4.4.5.
On the other hand, in my laptop with Ubuntu 14.04 LTS, root 5.34/18, and gcc/g++ versions gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, the code crashes with a segmentation fault, even though I use the same configurations and inputs.
I know that I am not being very specific, but It is too complicated to give you a way to reproduce the problem. I only want a hint to pursue the reason of this difference in execution. I already tried to install the same root version and using the same version of the compiler but the error persists.
Strange behaviour…
You can try to compile ROOT on your Ubuntu laptop with the debug mode (./configure --build=debug). It could say you the line where your program is crashing. Maybe, there is a bug in your code which is not “interpreted” on the Debian machine for some reasons
run your program with “valgrind” (on both archs),( you may need to install it first)
to find/exclude non initialized variables, index errors etc.
Of course try to find the place of the seg viol with “gdb”
and especially carefully study messages that appear in the beginning of the output.
(Note: the --show-reachable=yes option will give you too many warnings, I believe.)