Error in TBrowser and Colours not displayed

Hello,

I am having an issue with the TBrowser since I moved to CC7 and ROOT 6.12.06 (issue is still present in 6.16.00).

I have a ROOT file with many TCanvas saved, containing THStacks, Histograms and a TLegend.
When I open any TCanvas which is not the first one in the file (first one in the first TDirectory containing TCanvas), the colours are not displayed (e.g. h_k_m_colourless.png).
If I then open this first TCanvas in the file, colours are fine and any further TCanvas that I open looks fine (e.g. h_k_m_coloured.png, which is the same one as the colourless).

At the same time, when closing them, I receive the following error:
Error in <TList::Clear>: A list is accessing an object (0x7846c70) already deleted (list name = TList)

I assume those are related since I had none of those problem before.

Thanks for any help.

h_k_m_colourless.png:

h_k_m_coloured.png:


LCG93

_ROOT Version: 6.12.06
_Platform: CC7
_Compiler: gcc7.3.0


Can you post the root file containing these canvases ?

Yes, you can find it here
https://cernbox.cern.ch/index.php/s/C141zy0iPdDOx4C

@couet

I guess, problem is clear. Most probably, custom colors are used in the code. Custom colors are written into first TCanvas instance, but not in all consequent instances.

Yes but according to @nlurkin it seems a new problem … Seems to me it should have been that way since ever.

Yes I confirm that I have never seen this while using scl6/ROOT6.08.00 previously

Not really.
In previous ROOT versions custom colors always were written in each TCanvas.
Now there is function TColor::DefinedColors(). It remembers (in static member) how many colors were written last time. Only if numbers of new colors exceed 50, list of colors will be written again.