Re: [ROOT] TGaxis and <RootX11ErrorHandler>: BadValue (integer...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Oct 30 2001 - 17:01:43 MET


Hi Yuriy, Guennadi,

Following some more information given by Guennadi, I believe that I have
localized the source of this problem and fixed it in the CVS version.
The TGaxis constructors were setting the default title with " " instead of "".
This was given problems when the string was later interpreted by TLatex
and drawn on a Xfree86 engine.

Let me know if the problem still persists after this fix.

Rene Brun

Shitov Yuriy wrote:
> 
> Hi, ROOTmans, :)
> 
> I stroke with the same problem. The only difference is that I can't
> draw vertical axises instead of horisontal ones. E.g. script from
> Gennadiy Pospelov passed without problem, but this part of code
> of example for TGaxis class:
> 
> {  gROOT.Reset();
> 
>   c1 = new TCanvas("c1","Examples of Gaxis",10,10,700,500);
> 
>   c1->Range(-10,-1,10,1);
> 
>   TGaxis *axis3 = new TGaxis(-9,-0.8,-9,0.8,-8,8,50510,"");
>   axis3->SetName("axis3");
>   axis3->Draw();
> }
> 
> leads to root crash with the words:
> 
> Error in <RootX11ErrorHandler>: BadValue (integer parameter out of range
> 
> for operation) (XID: 0)
> 
> The same problem with tutorial function  twoscales()
> (ROOT/root/html/examples/twoscales.C.html). Script crashes on the final
> step
> trying to draw the new axis:
> 
> void twoscales()
> {
>    //example of macro illustrating how to superimpose two histograms
>    //with different scales in the "same" pad.
> 
> ...
>    //draw an axis on the right side
>    TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
>          gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
>    axis->SetLineColor(kRed);
>    axis->SetTextColor(kRed);
>    axis->Draw();
> // ~~~~~~~~~~~ this command crashes interactive root session!
> }
> 
> Configuration:
> 
> RH6.2
> $ uname -a
> Linux 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown
> packages versions:
> XFree86-3.3.6-20
> egcs-1.1.2-30
> glibc-2.1.3-15
> 
> ROOT from binary distribution
> 
> $ root
> 
>   *        W E L C O M E  to  R O O T       *
>   *   Version   3.02/01    8 October 2001   *
> ...
> FreeType Engine v1.x used to render TrueType fonts.
> Compiled with thread support.
> CINT/ROOT C/C++ Interpreter version 5.15.15, Sep 30 2001
> 
> Does somebody have any ideas how to fix this problems without
> system update?
> 
> Best wishes,
> Shitov Yuriy.
> 
> --
>     Shitov Yuriy.   All you need is Love!



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