Dear ROOTers,
I’m facing a very strange issue: I was testing ROOT version 6.20/00 (I am interested in the performances of the new compression introduced there) and I came stumbling on a very strange crash.
Essentially my executable is linked against the experiment software library and creates an object of type AMSChain
(inherited from TChain
). As soon as this happens the executable crashes
In file included from rootdict_s dictionary payload:118:
/storage/gpfs_ams/ams/users/vformato/AMS/include/../include/EcalKRec.h:39:2: error: redefinition of enumerator 'kElectron'
kElectron,
^
/storage/gpfs_ams/ams/users/vformato/devel/root-6.20.00.install/include/TPDGCode.h:25:31: note: previous definition is here
kSu1Bar=-3203,kSearches0=7,kElectron=11,kPositron=-11,kNuE=12,
^
In file included from rootdict_s dictionary payload:118:
/storage/gpfs_ams/ams/users/vformato/AMS/include/../include/EcalKRec.h:40:2: error: redefinition of enumerator 'kProton'
kProton,
^
/storage/gpfs_ams/ams/users/vformato/devel/root-6.20.00.install/include/TPDGCode.h:31:21: note: previous definition is here
kA2_1320Plus=215,kProton=2212,kProtonBar=-2212,
^
Error in <TInterpreter::AutoParse>: Error parsing payload code for class AMSChain with content:
So it looks like the interpreter is lazy-loading the class dictionary on the spot, parsing all the headers and then (rightfully?) complaining about a redefinition of an existing enum.
I can reproduce the same exact crash just by firing up the interpreter, loading the experiment library via gSystem->Load(...)
and creating a default-constructed AMSChain
object
root [0] gSystem->Load("lib/linuxx8664gcc6.20/libntuple_slc6_PG_dynamic.so");
root [1] AMSChain ch
// same exact crash happens
My questions to you are
- Why doesn’t this happen with ROOT 6.18/04? What changed in regard to dictionary header parsing?
- Assuming that the ROOT 6.18/04 shows the correct/intended behavior, what’s a possible fix for this issue? (meaning: is it really necessary to parse and interpret everything in a fully fledged compiled executable / library? I really would like this to behave as in all previous ROOT versions)
Cheers,
Valerio
ROOT Version: 6.20/00
Platform: CentOS 7
Compiler: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)