Open
Description
Check duplicate issues.
- Checked for duplicates
Description
I see a segfault with the following stacktrace
Fatal in <TBranchElement::InitializeOffsets>: Could not find the real data member 'branchparticles' when constructing the branch 'branchparticles' [Likely an internal error, please report to the developers].
aborting
#0 0x00007fe69d004967 in wait4 () from /lib64/libc.so.6
#1 0x00007fe69cf55c1b in do_system () from /lib64/libc.so.6
#2 0x00007fe69fe70008 in TUnixSystem::Exec (this=0xc303790, shellcmd=0xdb65f90 "/home/vpadulan/Programs/rootproject/rootbuild/master-distrdf-debug/etc/gdb-backtrace.sh 3094462 1>&2") at /home/vpadulan/Programs/rootproject/rootsrc/core/unix/src/TUnixSystem.cxx:2160
#3 0x00007fe69fe708ab in TUnixSystem::StackTrace (this=0xc303790) at /home/vpadulan/Programs/rootproject/rootsrc/core/unix/src/TUnixSystem.cxx:2451
#4 0x00007fe69fd03ab7 in DefaultErrorHandler (level=6000, abort_bool=true, location=0x7fe69d47a22c "TBranchElement::InitializeOffsets", msg=0xd87b010 "Could not find the real data member 'branchparticles' when constructing the branch 'branchparticles' [Likely an internal error, please report to the developers].") at /home/vpadulan/Programs/rootproject/rootsrc/core/base/src/TErrorDefaultHandler.cxx:177
#5 0x00007fe69fddebed in ErrorHandler(Int_t, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=6000, location=0x7fe69d47a22c "TBranchElement::InitializeOffsets", fmt=0x7fe69e22ca00 "Could not find the real data member '%s' when constructing the branch '%s' [Likely an internal error, please report to the developers].", ap=0x7ffd5113cf08) at /home/vpadulan/Programs/rootproject/rootsrc/core/foundation/src/TError.cxx:150
#6 0x00007fe69fd19dc0 in TObject::DoError (this=0xd80af90, level=6000, location=0x7fe69e22c69b "InitializeOffsets", fmt=0x7fe69e22ca00 "Could not find the real data member '%s' when constructing the branch '%s' [Likely an internal error, please report to the developers].", va=0x7ffd5113cf08) at /home/vpadulan/Programs/rootproject/rootsrc/core/base/src/TObject.cxx:1038
#7 0x00007fe69fd1a1f9 in TObject::Fatal (this=0xd80af90, location=0x7fe69e22c69b "InitializeOffsets", fmt=0x7fe69e22ca00 "Could not find the real data member '%s' when constructing the branch '%s' [Likely an internal error, please report to the developers].") at /home/vpadulan/Programs/rootproject/rootsrc/core/base/src/TObject.cxx:1103
#8 0x00007fe69e075423 in TBranchElement::InitializeOffsets (this=0xd80af90) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TBranchElement.cxx:3659
#9 0x00007fe69e07cc42 in TBranchElement::SetAddressImpl (this=0xd80af90, addr=0xd80b270, implied=false, offset=0) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TBranchElement.cxx:5494
#10 0x00007fe69e07a7d8 in TBranchElement::SetAddress (this=0xd80af90, addr=0xd80b270) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TBranchElement.cxx:4967
#11 0x00007fe69e07d4d0 in TBranchElement::SetObject (this=0xd80af90, obj=0x7ffd5113d610) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TBranchElement.cxx:5591
#12 0x00007fe69e0ed3da in TTree::BronchExec (this=0x7ffd5113d630, name=0x403493 "branchparticles", classname=0xda8b560 "vector<ShipParticle>", addr=0x7ffd5113d610, isptrptr=false, bufsize=32000, splitlevel=99) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TTree.cxx:2492
#13 0x00007fe69e0eb017 in TTree::BranchImpRef (this=0x7ffd5113d630, branchname=0x403493 "branchparticles", ptrClass=0xda8b9f0, datatype=kOther_t, addobj=0x7ffd5113d610, bufsize=32000, splitlevel=99) at /home/vpadulan/Programs/rootproject/rootsrc/tree/tree/src/TTree.cxx:1720
#14 0x00000000004015a8 in TTree::Branch<std::vector<ShipParticle, std::allocator<ShipParticle> > > (this=0x7ffd5113d630, name=0x403493 "branchparticles", obj=0x7ffd5113d610, bufsize=32000, splitlevel=99) at /home/vpadulan/Programs/rootproject/rootbuild/master-distrdf-debug/include/TTree.h:367
#15 0x000000000040127a in main () at /home/vpadulan/Projects/rootcode/oliver-lantwin/ship-particle/repro.cpp:13
when trying to create a branch of a TTree using a custom class with a dictionary.
Note that this is a blocker for SHiP in their effort to modernise the EDM.
Reproducer
Reproducer at https://github.com/vepadulano/ship-particle.git
ROOT version
Any
Installation method
Any
Operating system
Any
Additional context
Probably related forum posts:
https://root-forum.cern.ch/t/problem-creating-branch-with-vector-of-user-defined-class/23624