Fork me on GitHub

Opened 8 years ago

Closed 8 years ago

#1090 closed Bug (fixed)

Trouble with event display

Reported by: John Haggerty Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description (last modified by Pavel Demin)

I just started experimenting with Delphes, and I'm very impressed with it. I was able to build it (pretty) cleanly with gcc 4.8.2 and root 6.08.06 and the examples worked and made root files that I was able to make plots from. I got 3.4.1 today, and 3.4.0 yesterday.

But I can't get the event display to work in either version; I get a segfault right away:

[haggerty@rcas2073 delphes341]$ root -l examples/EventDisplay.C'("cards/delphes_card_CMS.tcl","delphes_output.root")'
root [0] 
Processing examples/EventDisplay.C("cards/delphes_card_CMS.tcl","delphes_output.root")...
Info in <TGeoManager::TGeoManager>: Geometry delphes, Delphes geometry created

 *** Break *** segmentation violation

I'll see if I can build it with debugging information so I can debug it, but maybe it rings a bell with someone. I usually can't figure out anything from the traceback, so I didn't attach the whole thing; this seems like the origin:

#5  0x00007f66ad313324 in dirname () from /lib64/libc.so.6
#6  0x00007f66925238da in ExRootConfReader::ReadFile(char const*, bool) () from /gpfs/mnt/gpfs02/sphenix/data/data01/haggerty/delphes/delphes341/libDelphesDisplay.so
#7  0x00007f66926712a4 in Delphes3DGeometry::readFile(char const*, char const*, char const*, char const*, char const*) () from /gpfs/mnt/gpfs02/sphenix/data/data01/haggerty/delphes/delphes341/libDelphesDisplay.so

Thanks again for a nice piece of work!

Change History (4)

comment:1 by John Haggerty, 8 years ago

I did a little debugging, and found the problem is here:

./external/ExRootAnalysis/ExRootConfReader.cc:  if(isTop) fTopDir = dirname(const_cast<char *>(fileName));

but as far as I can find, there is no memory allocated for fTopDir, it is not used anywhere, and there may be a problem with dirname altering the contents of its argument, so I commented it out and it seems to work ok.

Last edited 8 years ago by Pavel Demin (previous) (diff)

comment:2 by Pavel Demin, 8 years ago

Description: modified (diff)

comment:3 by Pavel Demin, 8 years ago

Thanks for spotting this problem. I've just fixed it my replacing dirname with gSystem->DirName. Here is a link to the changeset: d97a18b5a667135c87cc34c82f7a3f8ee806bb42/git.

comment:4 by Pavel Demin, 8 years ago

Resolution: fixed
Status: newclosed

The fixed code is now in the 3.4.1 release.

Note: See TracTickets for help on using tickets.