[Insight-users] Help needed: memory Leak in ReconstructionByDilationImageFilter

qi yang tinaqiyang at gmail.com
Mon Sep 19 10:21:33 EDT 2011


Thanks for looking into this. I still haven't solved this issue.

The following is the memory leak log from VS2010 output:

Detected memory leaks!
Dumping objects ->
{769} normal block at 0x09F40040, 1208320 bytes long.
 Data: < P G P G P G P G> 00 50 C3 47 00 50 C3 47 00 50 C3 47 00 50 C3 47
Object dump complete.

Then I stopped at {769} where is the filter->update(), the call stack log is
as following:

msvcr100d.dll!_heap_alloc_dbg_impl(unsigned int nSize, int nBlockUse, const
char * szFileName, int nLine, int * errno_tmp)  Line 393 C++
  msvcr100d.dll!_nh_malloc_dbg_impl(unsigned int nSize, int nhFlag, int
nBlockUse, const char * szFileName, int nLine, int * errno_tmp)  Line 239 +
0x19 bytes C++
  msvcr100d.dll!_nh_malloc_dbg(unsigned int nSize, int nhFlag, int
nBlockUse, const char * szFileName, int nLine)  Line 302 + 0x1d bytes C++
  msvcr100d.dll!_malloc_dbg(unsigned int nSize, int nBlockUse, const char *
szFileName, int nLine)  Line 160 + 0x1b bytes C++
  mfc100ud.dll!operator new(unsigned int nSize)  Line 321 + 0x10 bytes C++
  SA_Sgmt.exe!operator new[](unsigned int count)  Line 6 + 0x9 bytes C++
  SA_Sgmt.exe!itk::ImportImageContainer<unsigned
long,float>::AllocateElements(unsigned long size)  Line 178 + 0x19 bytes C++
  SA_Sgmt.exe!itk::ImportImageContainer<unsigned
long,float>::Reserve(unsigned long size)  Line 86 + 0x13 bytes C++
  SA_Sgmt.exe!itk::Image<float,2>::Allocate()  Line 52 C++
  SA_Sgmt.exe!itk::ImageSource<itk::Image<float,2> >::AllocateOutputs()
Line 216 + 0x26 bytes C++
  SA_Sgmt.exe!itk::ReconstructionImageFilter<itk::Image<float,2>,itk::Image<float,2>,std::greater<float>
>::GenerateData()  Line 112 + 0x12 bytes C++
When I commented the filter->update(), I don't see memory leak reported.

I hope those information can give us more ideas.

Thanks a lot,
Tina



On Sun, Sep 18, 2011 at 6:39 AM, Richard Beare <richard.beare at gmail.com>wrote:

> I've run a couple of tests with the mac leak detector and didn't see
> anything.
>
> 2011/9/17 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
> >
> > Hi,
> >
> > The memory leak message is not more detailed than that?
> > I'm afraid we can't do much with that, unfortunately...
> >
> > Regards,
> >
> > Gaëtan
> >
> >
> > Le 14 sept. 11 à 18:11, qi yang a écrit :
> >
> >> Hi,
> >>
> >> I have a memory leaking problem bothered me for hours...
> >>
> >> My VS2010 detected a big memory leak after "filter->Update()" of
> >> ReconstructionByDilationImageFilter.
> >> The related code is as following:
> >> typedef itk::ReconstructionByDilationImageFilter<ImageType, ImageType>
> >> FilterType;
> >>
> >> FilterType::Pointer filter = FilterType::New();
> >>
> >> filter->SetMarkerImage(markerImage);
> >>
> >> filter->SetMaskImage(maskImage);
> >>
> >> filter->Update();
> >>
> >> Do I need to release something after using the filter? What's the
> related
> >> function?
> >>
> >> Thanks for any tips!!
> >>
> >> Thanks,
> >> Tina
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.html
> >>
> >> Please keep messages on-topic and check the ITK FAQ at:
> >> http://www.itk.org/Wiki/ITK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.itk.org/mailman/listinfo/insight-users
> >
> > --
> > Gaëtan Lehmann
> > Biologie du Développement et de la Reproduction
> > INRA de Jouy-en-Josas (France)
> > tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> > http://mima2.jouy.inra.fr  http://www.itk.org
> > http://www.bepo.fr
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110919/e1ad33e2/attachment.htm>


More information about the Insight-users mailing list