← Back to team overview

yade-dev team mailing list archive

Re: [Bug 995874] [NEW] memory leak in Law2...Capillarity

 

I added the fixme when I saw how the original law add been "hacked" to
avoid crash after bodies removal, that is true.
OTOH, this "if (b1 && b2)" is now commented, so it cannot cause the leak.

There is no "new" operator in the code (well, there is one but it's in a
shared ptr, harmless), so it must be a vector which is pushed_back and
not always cleaned.
I suspect fusion detection not perfectly handling your recent changes
for deleting bridges and bodies.

Consider this:
line 77:       if ((*ii)->isReal()) {
                        ...
line 124:         cundallContactPhysics->meniscus=true;
line 176:       } else /*not real*/ if (fusionDetection)
bodiesMenisciiList.remove((*ii));

Now, what happens if the interaction is Real, then deleted?... It will
never be removed from the list.
I would double check this sort of situation, and try and find a vector
whose size is growing.
I don't know precisely what has been implemented recently and how it is
used, so I can't guess more.

Bruno

-- 
You received this bug notification because you are a member of Yade
developers, which is the registrant for Yade.
https://bugs.launchpad.net/bugs/995874

Title:
  memory leak in Law2...Capillarity

Status in Yet Another Dynamic Engine:
  New

Bug description:
  I detected a memory leak in the capillary model. When running several millions of steps (after ca. 2 days calc. time) my RAM is full (Note, that I have 32 GB, which should be enough for 600 particles ;) and swap also begin to fill.
  In line 91 of capillary model there is a comment:

  //                      /*if (b1 and b2)*/ {// FIXME: possible memory
  leak here?

  So this gives me the hint, that the leak is not on python-script side
  but on C++ side.

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/995874/+subscriptions


References