← Back to team overview

yade-dev team mailing list archive

Re: [Bug 813925] Re: InteractionContainer::erase: attempt to delete non-existent interaction

 

Anton,

I maybe understood the problem.
If we have, let's say, interaction (b1,b2). Then you delete both b1,b2
and create new bodies in the same iteration.
The new bodies will take ids left by b1 and b2, hence we have new bodies
with the same id as old bodies, and of course they don't contain the
interactions that were in b1/b2.
When traversing linIntrs, the old interactions are found, but they are
no longer contained in the new bodies. It triggers the "attempt to
delete    non-existent interaction". The fix is really simple: remove
the interaction from linIntrs even if they are not found in b1.
Currently we skip them and print warning. This is not good since they
will sit in memory forever.

After fixing this, we can revert the change in "if((!b1) or (!b2))
return false;" 

I can't try that now unfortunately. Will do ASAP, if I have a decent PC
and you send a script.

Also, I realized that bodies removal/addition breaks the "old" collider
stride mechanism, because bodies can be moving around (deleted at
position P1, added at position P2) with null velocity. Since the
collider is tracking velocities, it will not detect the movement. The
new collider should be ok, since it compares initial (stored in bbox)
and current position.

Bruno



On 14/10/11 13:59, Anton Gladky wrote:
> On Fri, Oct 14, 2011 at 1:41 PM, Chareyre <813925@xxxxxxxxxxxxxxxxxx> wrote:
>> Thanks for trying!
>> When was it fixed in the current branch?
>> Could you send me an example script?
> I did not fix that, just cannot reproduce the bug any more.
> The current script is __very__ large and complicated.
>
> I will try to test collide2-branch on a simpler (but similar) script
> and let you know.
>
> Anton
>


-- 
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
11, rue des Mathématiques
BP 46
38402 St Martin d'Hères, France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________



References