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

From: Andreas Zoglauer (zog@mpe.mpg.de)
Date: Thu Mar 04 2004 - 20:17:21 MET


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