segfault after deleting particles

Bug #1087680 reported by Bruno Chareyre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Medium
Unassigned
Revision history for this message
Anton Gladky (gladky-anton) wrote :

Fixed in f22aab98. The problem was in bodyNumInteractionsHistogram, it did not check, whether the body exists.

Anton

Changed in yade:
status: New → Fix Released
importance: Undecided → Medium
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Thanks, but is still a bug IMHO. Deleting bodies should also delete the interactions. I'm reopening.

The presence of a pointer to a deleted interaction can be tolerated, but I don't understand how O.bodies.erase(100) can leave interactions with bodyId=100 in the state i.isReal=true. This is not supposed to happen.

Changed in yade:
status: Fix Released → Confirmed
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Your fix was correct Anton, I'm sorry. The problem is that the function does not use body iterators and really assume that there is no empty slots in O.bodies. Can you please re-apply?

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

closing, Anton's fix was correct.

Changed in yade:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.