Bug with compiled code using TClass / dictionaries in Root 6.24

I’m creating a TTree with a class that inherits from a base class, without a problem. However, in the same program a couple lines later,

TClass branchClass(c->GetBranch("event")->GetClassName());
if (branchClass.InheritsFrom("dicttest::EventDis") {....}

fails with

Warning in <TClass::TClass>: no dictionary for class dicttest::EventPythia is available
Error in <TObjArray::At>: index 0 out of bounds (size: 1, this: 0x127faed70)
Error in <TObjArray::At>: index 0 out of bounds (size: 1, this: 0x127faed70)

It works fine interactively but not when compiled. I have a demonstrator that’s pretty minimal here:

This behavior is new to root 6.24, tested on Apple M1 and Ubuntu. The same code worked fine in root 6.20.04; I haven’t been able to test other versions.

I also opened an issue at Root 6.24: New bug with compiled code using TClass / dictionaries · Issue #8250 · root-project/root · GitHub but this may be the better forum to check whether I am doing something wrong.

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24
Platform: Both M1 and Ubuntu
Compiler: clang, gcc

Just checked, it also breaks in 6.22.08

OK let’s follow this in Github then - no point in keeping both that and this forum post in sync :slight_smile:

Makes sense. Thanks for taking it on, Axel!

Update: After further testing, it works in 6.20.04 and breaks in in 6.20.06 and thereafter. I’ll look into the particular release notes for more information.

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