Check duplicate issues.
Description
This a minimal reproducer (I think) of an issue I have been seeing with the xRooBrowser, which uses the classic TRootBrowser for its interface still. This reproducer uses just ROOT classes though, so I dont think its an xRooFit issue at its heart.
The issue seems to be that when the ListOfBrowsers is deleted, the TCanvasImp from the canvas in the browser gets deleted, but the pointer held by the TCanvas object doesn't get zeroed. Strangely, if one Deletes the Browsers list from the python prompt, the imp is zeroed (see reproducer below)
I am trying to figure out the best solution to this problem here, but thought I'd post the problem in case someone else can figure out the right solution.
Reproducer
import ROOT
ROOT.gInterpreter.ProcessLine("gEnv->SetValue(\"Browser.Name\", \"TRootBrowser\"); auto b = new TBrowser")
exit()
crashes inside TROOT::EndOfProcessCleanups() at the stage where it deletes the Canvases
But the following will work fine:
import ROOT
ROOT.gInterpreter.ProcessLine("gEnv->SetValue(\"Browser.Name\", \"TRootBrowser\"); auto b = new TBrowser")
ROOT.gROOT.GetListOfBrowsers().Delete()
exit()
ROOT version
master
Installation method
build from source
Operating system
MacOS (at least)
Additional context
No response
Check duplicate issues.
Description
This a minimal reproducer (I think) of an issue I have been seeing with the
xRooBrowser, which uses the classicTRootBrowserfor its interface still. This reproducer uses just ROOT classes though, so I dont think its an xRooFit issue at its heart.The issue seems to be that when the ListOfBrowsers is deleted, the TCanvasImp from the canvas in the browser gets deleted, but the pointer held by the TCanvas object doesn't get zeroed. Strangely, if one Deletes the Browsers list from the python prompt, the imp is zeroed (see reproducer below)
I am trying to figure out the best solution to this problem here, but thought I'd post the problem in case someone else can figure out the right solution.
Reproducer
crashes inside
TROOT::EndOfProcessCleanups()at the stage where it deletes the CanvasesBut the following will work fine:
ROOT version
master
Installation method
build from source
Operating system
MacOS (at least)
Additional context
No response