TEventList problem with subtraction

Hello,

There’s something weird happening and I’m not sure if it’s a bug or if I’m doing something wrong.

I have a class using TEventList to make selections in a TTree.
First I use the method t1->Draw(">>lev","some_selection") to get some events.

Then, I apply a second filter by subtracting a second TEventList from lev with some selection I made myself.

The problem comes when I want to “reset” the list. If I try to execute t1->Draw(">>lev",""), which would return me all the events, it gives me the error corrupted size vs. prev_size. Strangely, this error does not occur every time.

I could not create a script that would be able to reproduce the error. However, I have attached a script that comes pretty close. Execute it as root test.C and press anything after the script is executed. For me, the following message comes:

‘‘root.exe: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)’ failed.’’

PS.: With .x text.C or .L test.C it does not reproduce.

If one tries to execute line 22 in the terminal (removing it from the script), no error will follow. But, as soon as you press .q, the same corrupted size vs. prev_size error occurs (also with .x and .L)


ROOT Version: 6.26/06
Platform: Ubuntu 22.04
Compiler: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
test.C (454 Bytes)


Maybe @pcanal can help