Re: [ROOT] TH1F::Draw on empty histogram

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri May 25 2001 - 12:16:04 MEST


Hi Axel,
Default constructors of the histogram classes should not be called.
They must be public for I/O
I have protected the histogramming package against this misuse in the
CVS head.

Rene Brun

On Thu, 24 May 2001, Axel Naumann wrote:

> 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