Hi Michael, >From you small code portion I can see any obvious problem. I suspect a problem with object lifetime but can not really pin-point it. In order to further help you, I would need a small tar file allowing me to reproduce the problem. Also you may want to run with a version of ROOT build with the debug symbol and run your process in the debugger. Also I recommend trying out a tool named valgrind (http://valgrind.kde.org) (it would discover problem with early deletion or memory over-write). Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Michael Groys Sent: Thursday, March 04, 2004 5:01 AM To: ROOT MailingList Subject: [ROOT] segmentation violation in THashTable::FindObject Dear rooters, When I run my script I got a segmentation violation in THashTable::FindObject function. This is big piece of code that creates in a loop a lot of histograms. At some stage segmentation violation happens. The last words are: ------------------------- Creating Hist _hF23nn() Creating tmphupF23nn Creating tmphdownF23nn *** Break *** segmentation violation Generating stack trace... 0x0065f8cd in THashTable::FindObject(char const*) const + 0x47 from /data/alzt7/michaelg/root/lib/libCore.so 0x0065eda3 in THashList::FindObject(char const*) const + 0x17 from /data/alzt7/michaelg/root/lib/libCore.so 0x00321fb7 in TH1::Build() + 0x24f from /data/alzt7/michaelg/root/lib/libHist.so 0x003214bd in TH1::TH1[not-in-charge](char const*, char const*, int, double const*) + 0x121 from /data/alzt7/michaelg/root/lib/libHist.so 0x0033370c in TH1F::TH1F[in-charge](char const*, char const*, int, double const*) + 0x2a from /data/alzt7/michaelg/root/lib/libHist.so 0x0551ef45 in MF1::CreateErrorBand(TH1F*) at /d/alzt/michaelg/physics/Utilities ... =========== Before this the 22 sets of histograms were successfully created. The following lines of code are executed before the segmentation violation: -------------- int nbins = hist->GetNbinsX(); const Double_t* xbins=hist->GetXaxis()->GetXbins()->GetArray(); sprintf(buf, "tmphup%s", GetName()); printf("Creating %s\n", buf); TH1F hup(buf, buf, nbins, xbins); sprintf(buf, "tmphdown%s", GetName()); printf("Creating %s\n", buf); TH1F hdown(buf, buf, nbins, xbins); ======== I would very appreciate any proposes and suggestions. Best regards and thanks in advance, Michael PS. I'm using root 3.10/02 on RH10
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET