Re: What is wrong in the next macro ?

Masaharu Goto (gotom@hpyiddq.jpn.hp.com)
Thu, 26 Jun 1997 8:57:25 JST


Yuri,

The macro below worked fine on ROOT 1.00/10.

There was a bug in virtual base class implementation in CINT which was
fixed in several monthes ago. If you get older version, it is likely
that ROOT crashes when dealing with fstream. because ios is used as
a virtual base class.

Please check version of ROOT and CINT.

Masaharu Goto

> Dear colleagues !
> What is wrong in the next macro :
>
> #include <iostream.h>
> #include <fstream.h>
>
> void crash() {
> ifstream file("_name_of_any_existent_file_");
> }
>
> When I try to execute it, "root" is aborted.
> In more general case when an object of the ifstream class is created, I
> can read correctly the file, but always when ~ifstream() is called,
> "root" die...
> Thank you.
> Y.Belikov
>