Segmentation Fault in Garfield++ using ROOT v6.16/00

Hello everyone,

I am using garfield++ and it uses ROOT for plotting. The portion of the simulation that doesn’t use ROOT completes just fine, but whenever I try to call any ROOT method for plotting, here’s the error I get -

 ` *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00002b072d42427c in waitpid () from /lib64/libc.so.6
#1  0x00002b072d3a7c72 in do_system () from /lib64/libc.so.6
#2  0x00002b072821b7c4 in TUnixSystem::StackTrace() () from /home/officer/akd/root/lib/libCore.so.6.16
#3  0x00002b072821defc in TUnixSystem::DispatchSignals(ESignals) () from /home/officer/akd/root/lib/libCore.so.6.16
#4  <signal handler called>
#5  0x00002b0728138241 in TString::operator=(char const*) () from /home/officer/akd/root/lib/libCore.so.6.16
#6  0x00002b072811ded1 in TNamed::SetNameTitle(char const*, char const*) () from /home/officer/akd/root/lib/libCore.so.6.16
#7  0x000000000042bf52 in Garfield::ViewFEMesh::ViewFEMesh() ()
#8  0x000000000041df42 in main (argc=1, argv=<optimized out>) at avalanche1.cc:276
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00002b0728138241 in TString::operator=(char const*) () from /home/officer/akd/root/lib/libCore.so.6.16
#6  0x00002b072811ded1 in TNamed::SetNameTitle(char const*, char const*) () from /home/officer/akd/root/lib/libCore.so.6.16
#7  0x000000000042bf52 in Garfield::ViewFEMesh::ViewFEMesh() ()
#8  0x000000000041df42 in main (argc=1, argv=<optimized out>) at avalanche1.cc:276
===========================================================

Can someone please help me out?
ROOT Version: 6.16/00
Operating System - CentOS Linux release 7.3.1611 (Core)
$ROOTSYS = /home/officer/akd/root

Hi,
I suspect you use a different ROOT version during
building and running time
Otto

1 Like

Hello,
Thanks for helping out.This program is running on a Grid which has both v6.08 and v6.16 installed on it. But I ran the thisroot.sh script from my user area which had the v6.16 files. Is there anything else I should do to avoid this clash between versions?
Regards, Aritra.

Hi Aritra,
the question is with which ROOT was used when building
$GARFIELD_HOME/Library/libGarfield.a
A hint may give the following command

strings  $GARFIELD_HOME/Library/libGarfield.a | grep -i root | grep include
/software/opt/xenial/x86_64/root/6.14.04/include/TMatrixT.h

you see I get 6.14.04, but this need not be that simple
in your case

Cheers
Otto

Hello Otto,
I think that’s the issue. This is what I get:

/usr/include/root/TMatrixT.h

Garfield seems to have been built using the global installation of ROOT (v6.08) located at “/usr/include/root” rather than the v6.16 I had unzipped in my user area. (/home/officer/akd/root). I think I must build it again from scratch.

Is there anything else I can do apart from running thisroot.sh to set all environment variables to ensure that Garfield++ uses my version of ROOT?
Thanks for helping out.

Regards,
Aritra

Hello Aritra,

source $ROOTSYS/bin/thisroot.sh

should be enough.
However before that check that no other ROOTSYS has been set:

echo $ROOTSYS
echo $PATH

and better check afterwards if the desired ROOTSYS is really set

Cheers
Otto

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.