Skip to content

Check that fit succeeded and we actually have a track, before trying to print it.

Running with VERBOSE output in r07 I hit the following crash:

0x7f3d49abdd53 Trk::TrackInfo::dumpInfo[abi:cxx11]() const /build/atnight/localbuilds/nightlies/Athena/22.0/athena/Tracking/TrkEvent/TrkTrack/src/TrackInfo.cxx:52 + 0x203 [/cvmfs/atlas-nightlies.cern.ch/repo/sw/22.0_Athena_x86_64-centos7-gcc11-opt/2022-07-07T2101/Athena/22.0.75/InstallArea/x86_64-centos7-gcc11-opt/lib/libTrkTrack.so D[0x22d53]]
 0x7f3d49aba3b6 Trk::operator<<(MsgStream&, Trk::Track const&) /build/atnight/localbuilds/nightlies/Athena/22.0/athena/Tracking/TrkEvent/TrkTrack/src/Track.cxx:336 (discriminator 4) + 0x76 [/cvmfs/atlas-nightlies.cern.ch/repo/sw/22.0_Athena_x86_64-centos7-gcc11-opt/2022-07-07T2101/Athena/22.0.75/InstallArea/x86_64-centos7-gcc11-opt/lib/libTrkTrack.so D[0x1f3b6]]
 0x7f3d09ff4ce5 MsgStream::operator<<(MsgStream& (*)(MsgStream&)) /cvmfs/atlas-nightlies.cern.ch/repo/sw/22.0_Athena_x86_64-centos7-gcc11-opt/2022-07-06T2101/AthenaExternals/22.0.74/InstallArea/x86_64-centos7-gcc11-opt/include/GaudiKernel/MsgStream.h:134 (discriminator 5) + 0x565 [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x14fce5]]
 0x7f3d0a00406b Muon::MooTrackFitter::fit(EventContext const&, Muon::MuPatCandidateBase const&, Muon::MuPatCandidateBase const&, std::vector<Trk::PrepRawData const*, std::allocator<Trk::PrepRawData const*> > const*) const /home/emoyse/atlas/athena/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackFitter.cxx:236 + 0x70b [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x15f06b]]
 0x7f3d09fcd38f Muon::MooTrackBuilder::combine(EventContext const&, Muon::MuPatCandidateBase const&, Muon::MuPatCandidateBase const&, std::vector<Trk::PrepRawData const*, std::allocator<Trk::PrepRawData const*> > const*) const /home/emoyse/atlas/athena/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackBuilder.cxx:324 + 0x75f [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x12838f]]
 0x7f3d09fce07c std::__uniq_ptr_impl<Trk::Track, std::default_delete<Trk::Track> >::_M_ptr() const /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/unique_ptr.h:173 + 0x2c [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x12907c]]
 0x7f3d0a042cae Muon::MuonTrackSteering::combineOverlapSegments(EventContext const&, std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> >&, std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> >&, std::vector<std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> >, std::allocator<std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> > > >&, std::set<Muon::MuonStationIndex::StIndex, std::less<Muon::MuonStationIndex::StIndex>, std::allocator<Muon::MuonStationIndex::StIndex> >&, Muon::GarbageContainer&) const /home/emoyse/atlas/athena/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx:233 + 0x36e [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x19dcae]]
 0x7f3d0a0440c1 std::vector<std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> >, std::allocator<std::vector<Muon::MuPatSegment*, std::allocator<Muon::MuPatSegment*> > > >::operator[](unsigned long) /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/stl_vector.h:1046 + 0x431 [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x19f0c1]]
 0x7f3d0a0492ad Muon::MuonTrackSteering::find(EventContext const&, std::vector<Muon::MuonSegment const*, std::allocator<Muon::MuonSegment const*> > const&) const /home/emoyse/atlas/athena/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx:103 + 0x29d [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonTrackSteeringTools.so D[0x1a42ad]]
 0x7f3d21c263c8 std::__uniq_ptr_impl<DataVector<Trk::Track, DataModel_detail::NoBase>, std::default_delete<DataVector<Trk::Track, DataModel_detail::NoBase> > >::__uniq_ptr_impl(DataVector<Trk::Track, DataModel_detail::NoBase>*) /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/unique_ptr.h:155 + 0x2b8 [/home/emoyse/atlas/build/x86_64-centos7-gcc11-opt/lib/libMuonSegmentTrackMaker.so D[0x403c8]]
 0x7f3d501433f7 Gaudi::Algorithm::sysExecute(EventContext const&) /build/atnight/localbuilds/nightlies/Athena/22.0/build/build/AthenaExternals/src/Gaudi/GaudiKernel/src/Lib/Algorithm.cpp:366 + 0x1a7 [/cvmfs/atlas-nightlies.cern.ch/repo/sw/22.0_Athena_x86_64-centos7-gcc11-opt/2022-07-06T2101/AthenaExternals/22.0.74/InstallArea/x86_64-centos7-gcc11-opt/lib/libGaudiKernel.so D[0x2323f7]]

This MR should fix it - basically, we cannot print a track we don't have, so check if the fit failed before trying to dump it.

Tested with q445 locally.

This will not change output in any way.

Merge request reports

Loading