[ROOT] TH1F::Draw on empty histogram

From: Axel Naumann (axel@fnal.gov)
Date: Thu May 24 2001 - 22:59:37 MEST


Hi,

of course it's empty, but that doesn't mean it has to crash...

root [0] h1=new TH1F()
(class TH1F*)0x12d8b38
root [1] h1->Draw()
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Error in <TCanvas::Range>: illegal world coordinates range: x1=-1.#IND00,
y1=26250000488944355000000000000000.000000, x2
=-1.#IND00, y2=-236250000488944360000000000000000.000000
Error in <TCanvas::RangeAxis>: illegal axis coordinates range:
xmin=-1.#IND00, ymin=0.000000, xmax=-1.#IND00, ymax=-2100
00000000000010000000000000000.000000
Error in <TGraph::PaintGraphHist>: illegal number of points (0)

As soon as the mouse cursor is over the canvas, root crashes (instruction at
.... referenced memory at ... memory could not be read). And what's drawn in
the canvas looks quite weird, too.

Crashes on Win, 3.01/02 non debug. Can somebody fix that? I could imagine an
histogram that is only filled conditionally in some for loop, so it might
not be filled at all.

Cheers, Axel.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:46 MET