GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » crash
crash [message #20363] Thu, 23 February 2017 00:57 Go to next message
Gianluigi Boca is currently offline  Gianluigi Boca
Messages: 177
Registered: March 2004
first-grade participant
From: *
does anyone know why within the Init or Exec method of a class,
let's say in


class, the following very normal statements lead to an inexplicable
crash ?

TFile *f = new TFile("../dpm/digi_complete.root");
TTree * fTree = (TTree*) f->Get("cbmsim");
TClonesArray * fClone;
fTree->GetEntry(5); // it crashes here

Note that other things like


for instance give a quite normal usual output. The file ../dpm/digi_complete.root
has been generated with the standard sim_complete.C and digi_complete.C
Macros in the trunk repository.

The crash doesn't happen if I do the same statements within the


interactive command.

Thanks in advance
Re: crash [message #20370 is a reply to message #20363] Thu, 23 February 2017 21:01 Go to previous message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *
Dear Gianluigi,

the problem is the line:

TClonesArray* fClone;

You do not allocate memory for the TClonesArray which causes the crash.
Replace it with:

TClonesArray* fClone = new TClonesArray("PndSdsDigiPixel");


Previous Topic: svn error when updating pandaroot on kronos
Next Topic: New PandaRoot release feb17
Goto Forum:

Current Time: Sun Jul 21 05:36:31 CEST 2024

Total time taken to generate the page: 0.00572 seconds