Hi,
I have a problem with running compiled code with the new root version
3.01, from July 24 2001. I receive a segmentation violiation before
the programm enters the main routine. In this code I use a shared
library which consist of only one class, here's the header of this
library class:
>>>>>
#include <iostream.h>
#include <TObject.h>
#include <TClonesArray.h>
#include <TLorentzVector.h>
#include <TMath.h>
class TMath;
class TLorentzVector;
class TClonesArray;
const Int_t MAXJET = 10; // max number of jets
const Int_t MAXTRK = 100; // max number of tracks
class ZEvent : public TObject {
public:
ZEvent();
ZEvent(TClonesArray* zufoArray,TClonesArray* trackArray,Float_t
*trackChargeArray);
~ZEvent();
Float_t GetLtf(Int_t num);
Int_t GetnTracksInJet(Int_t num);
Float_t GetChargeOfJet(Int_t num);
Float_t GetChargeEWOfJet(Int_t num);
Float_t GetTrackFraction(Int_t num);
Float_t GetLeadingTrackJetFraction(Int_t num);
Float_t GetTrackJetFraction(Int_t num);
private:
TClonesArray jetArray; // 4vecs of jets
TClonesArray trkArray; // 4vecs of tracks
Float_t *trkChargeArray; // charge of tracks
ClassDef(ZEvent,0)
};
<<<<<
And here's the output from the debugger:
>>>>>
(gdb) run single_tau.xml
Starting program: /home/chinhan/tausearch/data/tau-estimators
single_tau.xml
Program received signal SIGSEGV, Segmentation fault.
0x40c6c78b in vfprintf () at vfprintf.c:1565
1565 vfprintf.c: No such file or directory.
Current language: auto; currently c
(gdb) where
#0 0x40c6c78b in vfprintf () at vfprintf.c:1565
#1 0x40c742c7 in fprintf () at fprintf.c:36
#2 0x404fb3b2 in G__check_setup_version () from
/cern/root/lib/libCint.so
#3 0x40b5b778 in G__cpp_setupZEventDict () at ZEventDict.cpp:468
#4 0x404eebee in G__call_setup_funcs () from /cern/root/lib/libCint.so
#5 0x40afb105 in G__cpp_setup_initG__Rint::G__cpp_setup_initG__Rint ()
from /cern/root/lib/libRint.so
#6 0x40afa583 in __static_initialization_and_destruction_0 () from
/cern/root/lib/libRint.so
#7 0x40afa602 in global constructors keyed to operator>> () from
/cern/root/lib/libRint.so
#8 0x40afa6a7 in __do_global_ctors_aux () from
/cern/root/lib/libRint.so
#9 0x40ae77d2 in _init () from /cern/root/lib/libRint.so
(gdb) up
#1 0x40c742c7 in fprintf () at fprintf.c:36
36 fprintf.c: No such file or directory.
(gdb) up
#2 0x404fb3b2 in G__check_setup_version () from
/cern/root/lib/libCint.so
(gdb) up
#3 0x40b5b778 in G__cpp_setupZEventDict () at ZEventDict.cpp:468
468 G__tag_memfunc_reset();
Current language: auto; currently c++
(gdb) up
#4 0x404eebee in G__call_setup_funcs () from /cern/root/lib/libCint.so
(gdb) up
#5 0x40afb105 in G__cpp_setup_initG__Rint::G__cpp_setup_initG__Rint ()
from /cern/root/lib/libRint.so
(gdb) up
#6 0x40afa583 in __static_initialization_and_destruction_0 () from
/cern/root/lib/libRint.so
(gdb) up
#7 0x40afa602 in global constructors keyed to operator>> () from
/cern/root/lib/libRint.so
(gdb) up
#8 0x40afa6a7 in __do_global_ctors_aux () from
/cern/root/lib/libRint.so
(gdb) up
#9 0x40ae77d2 in _init () from /cern/root/lib/libRint.so
(gdb) up
Initial frame selected; you cannot go up.
(gdb)
<<<<<
There are no problems when I use the older root version
3.00, from May 02 2001.
I hope someone can help me.
Thanks, Chi Nhan.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:53 MET