Re: [ROOT] Odd behaviour in root 3.03/09 when script loads

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Mon Oct 28 2002 - 10:04:40 MET


Hi Ed,
We have observed the same problems several times here at Utrecht
on win98, win2k and winNT machines.
Last time when I was at CERN I showed it to Rene and he even
could reproduce the problem on his machine.
It doesn't have anything to do with your scrip; just start a
ROOT session and it can happen as well.
Note that if you start a batch root session (i.e. root -b)
the problem never occurs. 
My 2 cents is that the problem is related to an incorrect
initialisation at the loading time of the graphics libs.

                                        Cheers,
                                         Nick.

-- 
Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick
--------------------------------------------------------------------------
Org.:    Utrecht University, Faculty of Physics and Astronomy
Address: Princetonplein 5, NL-3584 CC Utrecht, The Netherlands
Phone:   +31-30-2532331(direct) +31-30-2531492(secr.)  Fax: +31-30-2518689
CERN:    +41-22-7679751(direct) +41-22-7675857(secr.)  Fax: +41-22-7679480
Offices: Buys Ballot laboratory Room 710 (Utrecht)   B23 1-020 (CERN)
--------------------------------------------------------------------------


Ed Oltman wrote:
> 
> Hello,
>  I have noticed an odd behavior in the root v3.03/09 on win2k:
> Occasionally, when I run root and load in my main.cpp script,
> I get strange errors [See below].  However, if I try to execute
> the script again it works fine.  If I exit root (.q) and re-run
> root and reload the same script, it still works fine.  I thought
> it was just the first time after  I restart my computer but it
> happens more frequently than that. It does not necessarly happen
> when I open new DOS box - except  the first time after I restart
> the computer...
> 
> Any ideas?  Thanks..
> 
> Ed Oltman
> 
> c:\analysis01>root
>  the current keyboard layout is 437
>   *******************************************
>   *                                         *
>   *        W E L C O M E  to  R O O T       *
>   *                                         *
>   *   Version   3.03/09 18 September 2002   *
>   *                                         *
>   *  You are welcome to visit our Web site  *
>   *          http://root.cern.ch            *
>   *                                         *
>   *******************************************
> 
> Compiled for win32.
> 
> CINT/ROOT C/C++ Interpreter version 5.15.56, Sep 4 2002
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] .x main.cpp
> Error: class,struct,union or type unknown not defined
> FILE:C:\root/include\RtypesCint.h LINE:1
> (unknown)121
> *** Interpreter error recovered ***
> root [1]
> 
> Also, here is my main.cpp file - its purpose is to load a dll.
> 
> c:\analysis01>type main.cpp
> class CManage;
> void main(char *fname="")
> {
>         gROOT->Reset();
>         char path[256];
> 
>         // If fname is non-empty, use %rootsys%\analysis.dll
>         //   otherwise use analysis.dll in current directory
>         if (fname && *fname)
>                 sprintf(path,"%s\\Analysis.dll",gRootDir);
>         else
>                 strcpy(path,"analysis.dll");
>         gROOT->LoadMacro(path);
>         CManage *m = new CManage();
> 
>         // if fname is non-empty, its an analyzed file - restore it...
>         if (fname && *fname)
>         {
>                 m->RestoreAnalyzed(fname);
>                 gAn->m_pResolution->Draw();
>                 gPad->GetCanvas()->Update();
>         }
> }



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET