Read problem on ULong64_t data type

Hi:
Could someone help me on reading the ULong64_t data type?
I attached the c++ program and the root file I used.
Basically, there is no problem when I run it in the root CINT, for both ULong64_t and Float_t. When compiling c++ program standalone,

g++ check_commonhash.C -o check_commonhash `root-config --cflags --libs` -std=c++11

and run ./check_commonhash, the error pops up for ULong64_t. But no problem for Float_t. Strange.

 *** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fc96531f41c in waitpid () from /lib64/libc.so.6
#1  0x00007fc96529cf12 in do_system () from /lib64/libc.so.6
#2  0x00007fc969cd8814 in TUnixSystem::StackTrace (this=0xe46980) at /home/weiyingjie/Downloads/root/core/unix/src/TUnixSystem.cxx:2413
#3  0x00007fc969cdaf4c in TUnixSystem::DispatchSignals (this=0xe46980, sig=kSigSegmentationViolation) at /home/weiyingjie/Downloads/root/core/unix/src/TUnixSystem.cxx:3644
#4  <signal handler called>
#5  0x00000000004010cd in main ()
===========================================================


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  0x00000000004010cd in main ()
===========================================================

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.14/04
Platform: centos7
Compiler: gcc 4.8.5 20150623


check_commonhash.C (749 Bytes)
https://cernbox.cern.ch/index.php/s/yXX7QyVTsivm7ge

“tree->Print()” says:

*Br    0 :CommonEventHash : CommonEventHash[2]/l                             *

so you need “ULong64_t commonhash[2]”.

1 Like

Wonderful! I can’t thank you enough.
Didn’t realize that it’s an array.

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