Crash with ROOT 5.22 and FitPanel

I’m using ROOT 5.22 on linux 32b, with ubuntu 8.10. I get this message trying to use the fitpanel from the gui:
root.exe: gui/fitpanel/src/TFitEditor.cxx:1872: virtual void TFitEditor::DoDataSet(Int_t): Assertion `objSelected’ failed.

More annoying is the fact that ROOT crashes and exists.

Has this been seen before ?


S Poss.

Can you explain how you get to such situation?

That, as far as I am concerned, only happens when the object you have selected in the fitpanel to be fitted has been deleted, so it no longer exists and the fitpanel cannot find it.

do the following:
marposs:~/work/Bu2JPsiK/code/plots> root -l bug.root
Welcome, user poss, on for a local session
*** Start at Date : 3-Mar-2009 Time : 10:23:23 ***

RooFit v2.95 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2008 NIKHEF, University of California & Stanford University
All rights reserved, please read

*** QAInfo: You are using ROOT_LEVEL : /home/poss/root ***
*** QAInfo: and node : marposs ***
root.exe [0]
Attaching file bug.root as _file0…
root.exe [1] TH1Dh1 = (TH1D)gDirectory->Get(“B mass Sel Sig”)
root.exe [2] h1
(class TH1D*)0xa3b2fb0
root.exe [3] h1->Draw()
TCanvas::MakeDefCanvas: created default TCanvas with name c1
root.exe [4] root.exe: gui/fitpanel/src/TFitEditor.cxx:1872: virtual void TFitEditor::DoDataSet(Int_t): Assertion `objSelected’ failed.

The crash happens when I click on the histogram and try to get the fit panel.

I attached the root file.
bug.root (6.19 KB)

Thanks. It’s now fixed in the development branch.

The explanation is the next, I was using an assertion for testing purposes, so that if the object was not found, the fitpanel would exit. As with the tests I did it seemed like it would only stop working if the object was deleted after the fitpanel was called. However, it seems like in your example, for some reason, the fitpanel looks for the object twice, and the first time it does not find it. I honestly do not know the reason of this, but removing the assertion makes it to work.

I cannot tell you when the patch will be in the development version (trunk), but I hope it will be pretty soon.


You can tell me where I need to remove the assertion in my root version, and I can recompile.

Thanks for having looked into it.