|
[Rivet] segfault while declaring arrays of histogramsHolger Schulz holger.schulz at durham.ac.ukFri Aug 5 13:48:29 BST 2016
Hi, sure! You could append your source code and I can have a look. In 99 percent of the cases it's something like asking for the leading item of a collection via [0] without checking if anything survived the cuts :) Holger On 05/08/16 13:44, Raghav Kunnawalkam Elayavalli wrote: > Hi David and Holger, > > yeah ive used gdb long ago with root, but could you help me with using > gdb with rivet now? > As it happens, im struggling with another crazy run-time seg fault > (which ive had two of my colleagues look at without any success in > debugging it) at the moment and would really appreciate any help. > > Cheers > Raghav >> On Aug 4, 2016, at 4:04 PM, David Bjergaard >> <david.bjergaard at gmail.com <mailto:david.bjergaard at gmail.com>> wrote: >> >> Hi Raghav, >> >> It looks like Holger found the typo. A few tips: >> 1. C++ is multi-paradigm, but I tend to prefer using C++ data >> structures over C since they tend to throw meaningful exceptions >> where C just blows up >> 2. Gdb is your friend when it comes to debugging segfaults >> >> Shameless plug for a resource I wrote: >> www.phy.duke.edu/~dmb60/the-guide >> <http://www.phy.duke.edu/%7Edmb60/the-guide> >> >> There are links to lots of HEP software resources and, specific to >> you gdb, tutorials. >> >> Good luck! >> >> David >> >> On Aug 4, 2016, at 9:55 AM, Holger Schulz <holger.schulz at durham.ac.uk >> <mailto:holger.schulz at durham.ac.uk>> wrote: >> >>> Hi Raghav, >>> >>> that looks roughly correct to me, maybe this is the culprit: >>> >>> >>> On 04/08/16 14:08, Raghav Kunnawalkam Elayavalli wrote: >>>> for(int j = 0; j<_NJES_pt; ++i){ >>> ++j maybe? >>> >>> Holger >>> _______________________________________________ >>> Rivet mailing list >>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org> >>> https://www.hepforge.org/lists/listinfo/rivet > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20160805/5b31a8d0/attachment.html>
More information about the Rivet mailing list |