SetBranchAddress() Fatal: cl && cl->GetCollectionProxy() violated at line 2198

Hello all.

I am trying to read a root file which I am producing with my own code - I have everything at hand.

The most important lines are:

TString branchName1("Left_telescope_SQX_L.fDetMessages");
TClonesArray* clarDetM1 = new TClonesArray("DetMessage");
inTree->SetBranchAddress(branchName1, &clarDetM1);

The full macro is in the attachment, though most probably it wouldn’t help.

analyse3.C (2.4 KB)

Below is the error I am getting and I have no idea how to fight that. The ‘DetMessage’ class seems to be defined properly - with the ClassDef(), ClassImp() and the LinkDef.h file. It is compiled with some other classes into a dynamic library which is in the same directory as the macro is called from, together with the _rdict.pcm and .rootmap files.

DetMessage.cxx (777 Bytes)
DetMessage.h (555 Bytes)

I appreciate any help.

Fatal: cl && cl->GetCollectionProxy() violated at line 2198 of `/home/evovch/soft/FairSoft/tools/root/tree/tree/src/TBranchElement.cxx’
aborting
#0 0x00007f672c16f687 in __GI___waitpid (pid=30208, stat_loc=stat_loc
entry=0x7fff341fa728, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007f672c0da067 in do_system (line=) at …/sysdeps/posix/system.c:149
#2 0x00007f672cd10397 in TUnixSystem::StackTrace() () from /home/evovch/soft/FairSoft_install/lib/root/libCore.so.6.10
#3 0x00007f672cc13040 in DefaultErrorHandler(int, bool, char const*, char const*) () from /home/evovch/soft/FairSoft_install/lib/root/libCore.so.6.10
#4 0x00007f672cc129d2 in ErrorHandler () from /home/evovch/soft/FairSoft_install/lib/root/libCore.so.6.10
#5 0x00007f672cc12ecf in Fatal(char const*, char const*, …) () from /home/evovch/soft/FairSoft_install/lib/root/libCore.so.6.10
#6 0x00007f67210689d7 in TBranchElement::GetCurrentClass() () from /home/evovch/soft/FairSoft_install/lib/root/libTree.so.6.10.08
#7 0x00007f672106af1a in TBranchElement::SetAddress(void*) () from /home/evovch/soft/FairSoft_install/lib/root/libTree.so.6.10.08
#8 0x00007f67210ac43e in TTree::SetBranchAddressImp(TBranch*, void*, TBranch**) () from /home/evovch/soft/FairSoft_install/lib/root/libTree.so.6.10.08
#9 0x00007f67210ac5e1 in TTree::SetBranchAddress(char const*, void*, TBranch**, TClass*, EDataType, bool) () from /home/evovch/soft/FairSoft_install/lib/root/libTree.so.6.10.08


ROOT Version: 6.10/08
Platform: Ubuntu 18.04 LTS
Compiler: gcc 7.3.0


Can you provide a sample of the ROOT file?

Thank you!

si_1000_LR_02_0001.lmd.root (169.7 KB)

Not sure that it’s going to help. There are some dependencies and it would be quite hard to reproduce the situation. Please, let me know if you need something else.

Since you seem to be able to load the shared library the easiest work-around is:

DetEventStation *ptr = nullptr;
TString branchName1("Left_telescope_SQX_L.");
TString branchName2("Left_telescope_SQX_L.fDetMessages");
inTree->SetBranchAddress(branchName1, &ptr);
auto br = inTree->GetBranch(branchName2); // if needed to call GetEntry on and read only the TClonesArray part.

Cheers,
Philippe.

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