Re: [ROOT] Loading ROOT libraries on Windows

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jan 17 2002 - 12:42:11 MET


Hi Pere,

Thanks for reporting this problem. We will fix it.

Rene Brun

Pere Mato wrote:
> 
> Valeri, Fons,
> 
>   I did check ROOTSYS and PATH environment variables and everything is
> according to your indications. I even download Valeri's installation just to
> see if there was a problem with mine. Also the changed Root.ShowPath to true
> but it didn't help because the crash happens before anything is printed.
> 
>   Debugging at assembler level I noticed that the access violation occurs in
> the method TWinNTSystem::Which() that is called by TSystem::Load() when not
> full path given. This method expects a maximum PATH length of 1024 (the
> value of kMAXPATHLEN) and unfortunately by PATH was longer than that!!!
> Reducing the PATH to less than 1024 it works.
> 
>  Taking into account the PATH on Windows can be longer than 1024 (DOS limit
> is at 2048 I think) I would suggest to change the limit or put better
> protection.
> 
>  Thanks for your hints,
> 
>                                 Pere
> 
> > -----Original Message-----
> > From: owner-roottalk@pcroot.cern.ch
> > [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Valeri Fine
> > Sent: 16 January 2002 18:13
> > To: Pere Mato; Roottalk
> > Subject: Re: [ROOT] Loading ROOT libraries on Windows
> >
> >
> >
> > ----- Original Message -----
> > From: "Pere Mato" <Pere.Mato@cern.ch>
> > To: "Roottalk" <roottalk@pcroot.cern.ch>
> > Sent: Wednesday, January 16, 2002 7:43 AM
> > Subject: [ROOT] Loading ROOT libraries on Windows
> >
> >
> > > Hello,
> > >
> > >   I am trying to load standard ROOT libraries within a C++
> > module using the
> > > method TSystem::Load(). I seems that it works only if I put the
> > full path
> > > where the library is. If I use only the library name it
> > generates an "access
> > > violation" even if I have in the PATH the location where the
> > libraries are.
> > >
> > >   gSystem->Load("libHist")  // Access violation!
> > >   gSystem->Load("S:/sw/ROOT/v3.01/nt4/root/bin/libHist.dll")  // Works!!
> > >
> >
> >   What is your environment ? Before asking Windows to load DLL
> > ROOT checks the access
> >   to that library  on its own
> >
> >   In this case the path to look up is picked from the
> > system.rotor file. The later itself is found under
> >  %ROOTSYS%/etc. To get the "Windows" behavior the %ROOTSYS%\bin
> > should be in your PATH
> >   and ROOT search path (within ".rootrc" file) should include $PATH.
> >
> > Anyway first make sure your env variables do match that ?
> >
> >
> > You may want to find system.rootrc and edit it to replace
> >
> > Root.ShowPath:           false
> >
> > with
> >
> > Root.ShowPath:           true
> >
> > Then you should get some extra output from ROOT.  That may help
> > us to sort things out.
> > I woiuld recommenr you to install ROOT from
> >
> > http://www.usatlas.bnl.gov/~fine/downloadRoot.html
> >
> > This should set your env properly and automatically.
> >
> > Hope this helps,
> >
> >   Valeri
> >
> > >   Any explanation?
> > >
> > > Pere
> > >
> > > ------------------------------------------------------------
> > > Pere Mato  CERN, EP Division, CH 1211 Geneva 23, Switzerland
> > >            e-mail: Pere.Mato@cern.ch    tel: +41 22 76 78696
> > >            fax:  +41 22 76 79425        gsm: +41 79 20 10855
> > >
> > >
> > >
> >
> >



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