Re: How do I plot only certain parts of a 2d histo

David Hardtke (hardtke@sseos.lbl.gov)
Fri, 12 Mar 1999 07:02:59 -0800 (PST)


Hi Rene,

In this case, the segmentation violation occurs when I do the following to
a filled 2d histogram:

2dhist->SetMaximum(0.1)

This was a mistaken attempt to set limits on the y-axis. The command
works OK as long as the maximum is >=1, but if it is less than 1 it
causes a segmentation violation.

I understand why this operation is a mistake, but it seems that an
interactive program should have some protection against illegal operations
that cause the program to crash or at least have some mechanism for
recovering from such a mistake without starting over.

Dave

> > In nearly every ROOT session, I end up with:
> >
> > *** Break *** segmentation violation
> >
> > This, of course, means I did something wrong. Is there anyway to recover
> > from this without starting over?
> >
>
> I cannot do much with just this information. Could you run Root under
> the debugger and send me the traceback when you get the segmentation
> violation. To use the debugger (I assume you are on a Unix system), use
> gdb
> gdb root.exe
> run
> ... your session
> gdb> info stack
>
> Also some explanation of what you are doing what the crash appears would
> be welcome.
>
> Rene Brun
>