Pure virtual function error with TLegend::GetListOfPrimitives

Dear experts,

I am encountering a strange error with ROOT 6.14/06 in macOS Mojave 10.14.6. I am generating a plot using the attached script:
debug.py (578 Bytes)
This script runs fine without error. When I open the output file and draw the TCanvas inside it, it looks OK. However, when my ROOT session ends, or when any script that opens and draws that TCanvas finishes, I see this error:

jhak # root -l debug.root
root [0]
Attaching file debug.root as _file0...
(TFile *) 0x7fbf11119100
root [1] _file0->Get("c1")->Draw()
root [2] .q
libc++abi.dylib: Pure virtual function called!

A few seconds later, a popup window appears in the foreground:
annoying
Here is a sample of the “Report…” it generates:
error-log.txt (54.8 KB)

The reason I am calling TLegend::GetListOfPrimitives is because iterating over the primitives is very useful for changing the legend entries. This behavior seems like a bug, but please let me know if there is a workaround so that this could be done without generating these errors and popup windows.

Thanks,
John


Update: I tested this in a Scientific Linux 7 environment, and I get a similar error message (however, the annoying popup is not present.)

jhakala@cmslpc134 $ python debug.py
jhakala@cmslpc134 $ root -l debug.root
root [0]
Attaching file debug.root as _file0...
(TFile *) 0x3d9b1b0
root [1] _file0->Get("c1")->Draw()
root [2] .q
pure virtual method called
terminate called without an active exception
jhakala@cmslpc134 $ root --version -b
ROOT Version: 6.20/00
Built for linuxx8664gcc on Feb 26 2020, 16:40:17
From tags/v6-20-00@v6-20-00
jhakala@cmslpc134 $ cat /etc/redhat-release
Scientific Linux release 7.8 (Nitrogen)

I just tried on Mac with the ROOT master version (ROOT 6.23/01) on Mac. It is fine. I do not see this error.

Hi @jhak,
as you seem to also have this issue with v6.20, could you please provide a simple recipe for us to reproduce the error so we are able to debug what’s going on? For example, are you able to reproduce the problem on lxplus?

Cheers,
Enrico

@eguiraud It seems to me that the “reproducer” is right in the end of the original post.

Thank you @Wile_E_Coyote, I was hoping @jhak could try out on lxplus and let us know if the problem is also present there, and with what LCG release :sweat_smile:

But fair enough, I could also take the time to do it myself.

Indeed the problem is still present with LCG_97, i.e. ROOT v6.20, but it doesn’t seem to be present in latest master (source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc8-dbg/setup.sh).

@jhak: if you can confirm the problem is not present with current master, I think that given the error message is more an annoyance than anything else we could wait for the upcoming 6.22 to fix it. Otherwise, please open a bug report at https://sft.its.cern.ch/jira/projects/ROOT and we will take a look at it.

Cheers,
Enrico

Out of curiosity … I’ve just tried your “Gentoo prefix” (on a CentOS 7 machine) which provides ROOT 6.23/01 (Built for linuxx8664gcc on May 25 2020, 19:22:00) and I still get this problem.

Cool, can you or @jhak please open a bug report?

Cheers,
Enrico

Hi All,

Thanks again for looking into this. At @couet’s recommendation, I installed a nightly version of ROOT on my macOS 10.14.6 machine and this eliminates the error.

ROOT Version: 6.23/01
Built for macosx64 on May 28 2020, 05:23:00
From remotes/origin/master@v6-23-01-76-g5517d7d679

Thanks!

–John

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