# HG changeset patch # User Benjamin Golinvaux # Date 1564407551 -7200 # Node ID 401808e7ff2e0f8cb889f9fa90baaddad1c97e57 # Parent 094d10ed7ec2e75484db49ad591ec5292d375a14 Added traces in LoaderCache objects dtors + fuse to prevent dead weak ptrs to be calleds in VisitWdigets (in GuiAdapter.h) diff -r 094d10ed7ec2 -r 401808e7ff2e Applications/Generic/GuiAdapter.h --- a/Applications/Generic/GuiAdapter.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Applications/Generic/GuiAdapter.h Mon Jul 29 15:39:11 2019 +0200 @@ -364,7 +364,12 @@ for (size_t i = 0; i < widgets_.size(); i++) { boost::shared_ptr widget = widgets_[i].lock(); - func(widget); + + // TODO: we need to clean widgets! + if (widget.get() != NULL) + { + func(widget); + } } } }; diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/DicomStructureSetLoader.cpp --- a/Framework/Loaders/DicomStructureSetLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -233,6 +233,11 @@ } + DicomStructureSetLoader::~DicomStructureSetLoader() + { + LOG(TRACE) << "DicomStructureSetLoader::~DicomStructureSetLoader()"; + } + void DicomStructureSetLoader::LoadInstance(const std::string& instanceId) { Start(); diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/DicomStructureSetLoader.h --- a/Framework/Loaders/DicomStructureSetLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -49,6 +49,8 @@ DicomStructureSetLoader(IOracle& oracle, IObservable& oracleObservable); + ~DicomStructureSetLoader(); + void LoadInstance(const std::string& instanceId); virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane); diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/OrthancMultiframeVolumeLoader.cpp --- a/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -333,6 +333,10 @@ } } + OrthancMultiframeVolumeLoader::~OrthancMultiframeVolumeLoader() + { + LOG(TRACE) << "OrthancMultiframeVolumeLoader::~OrthancMultiframeVolumeLoader()"; + } void OrthancMultiframeVolumeLoader::LoadInstance(const std::string& instanceId) { diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/OrthancMultiframeVolumeLoader.h --- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -59,6 +59,8 @@ OrthancMultiframeVolumeLoader(boost::shared_ptr volume, IOracle& oracle, IObservable& oracleObservable); + + virtual ~OrthancMultiframeVolumeLoader(); void LoadInstance(const std::string& instanceId); }; diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -430,6 +430,10 @@ (*this, &OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent)); } + OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader() + { + LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()"; + } void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count) { diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -119,6 +119,8 @@ IOracle& oracle, IObservable& oracleObservable); + virtual ~OrthancSeriesVolumeProgressiveLoader(); + void SetSimultaneousDownloads(unsigned int count); void LoadSeries(const std::string& seriesId); diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Volumes/DicomVolumeImageMPRSlicer.cpp --- a/Framework/Volumes/DicomVolumeImageMPRSlicer.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Volumes/DicomVolumeImageMPRSlicer.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -100,7 +100,12 @@ } - IVolumeSlicer::IExtractedSlice* + DicomVolumeImageMPRSlicer::~DicomVolumeImageMPRSlicer() + { + LOG(TRACE) << "DicomVolumeImageMPRSlicer::~DicomVolumeImageMPRSlicer()"; + } + + IVolumeSlicer::IExtractedSlice* DicomVolumeImageMPRSlicer::ExtractSlice(const CoordinateSystem3D& cuttingPlane) { if (volume_->HasGeometry()) diff -r 094d10ed7ec2 -r 401808e7ff2e Framework/Volumes/DicomVolumeImageMPRSlicer.h --- a/Framework/Volumes/DicomVolumeImageMPRSlicer.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Volumes/DicomVolumeImageMPRSlicer.h Mon Jul 29 15:39:11 2019 +0200 @@ -89,6 +89,8 @@ { } + virtual ~DicomVolumeImageMPRSlicer(); + virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE; }; }