Re: [ROOT] Different behaviour (i.e. Crash) of TString on Linux and Windows

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Fri Mar 05 2004 - 11:19:03 MET


Hello rootalk,
I appologize for spoiling the list.
That was my private mail.

Regards. Valeriy


> Privet, Valera
> Pill pivo s Vikotrom Perev, segodnya.
> How are you (RootQt)? No "grab pointer problems"?
> 
> Thank yuo. Balepa
> 
> 
> ----- Original Message ----- 
> From: "Valeri Fine" <fine@bnl.gov>
> To: "'Andreas Zoglauer'" <zog@mpe.mpg.de>; <roottalk@pcroot.cern.ch>
> Sent: Thursday, March 04, 2004 9:52 PM
> Subject: RE: [ROOT] Different behaviour (i.e. Crash) of TString on Linux and Windows
> 
> 
> > It seems to me I have found the related topics:
> > 
> > http://root.cern.ch/phpBB2/viewtopic.php?t=442&highlight= 
> > 
> > and 
> > 
> > http://root.cern.ch/root/roottalk/roottalk04/0097.html
> > 
> > 
> > 
> > Anyway I was not able to reproduce the crash. 
> > 
> > The only problem I found calling from CINT interactive session:
> > 
> >     TString W = "Hello World";
> >     cout<<W<<endl;               // there is no output
> >     cout<<(const char *)W<<endl; // it is Ok
> >     Hello World
> > 
> > ----
> > Best regards
> >                    Valeri
> > 
> > 
> > > -----Original Message-----
> > > From: owner-roottalk@pcroot.cern.ch
> > [mailto:owner-roottalk@pcroot.cern.ch] On
> > > Behalf Of Andreas Zoglauer
> > > Sent: Thursday, March 04, 2004 2:17 PM
> > > To: roottalk@pcroot.cern.ch
> > > Subject: [ROOT] Different behaviour (i.e. Crash) of TString on Linux
> > and Windows
> > > 
> > > 
> > > Hello,
> > > 
> > > The following little program has different behaviour on windows and on
> > > Linux:
> > > 
> > > #include <iostream>
> > > using namespace std;
> > > #include "TString.h"
> > > 
> > > int main()
> > > {
> > >    TString W = "Hello World";
> > >    cout<<W<<endl;
> > > 
> > >    return 0;
> > > }
> > > 
> > > On Linux, the output is of course: Hello, World!
> > > But on Windows I get a Crash (access violation)!!
> > > 
> > > Wenn I replace <iostream> with <Riostream.h> I also crashes on
> > Windows.
> > > There is no crash when I replace cout<<W<<endl; with
> > cout<<W.Data()<<endl;
> > > 
> > > Unfortunately I am no Windows expert, so I cannot debug ROOT on
> > Windows,
> > > but if I should guess, it might be a problem in ostream& <<operator of
> > > TString??
> > > 
> > > I am using ROOT v4.00/02 win32gdk with Visual C++ 6.0 SP3
> > > 
> > > Ciao,
> > > Andreas Zoglauer
> > 
> > 
> > 
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET