yade-users team mailing list archive
Mailing list archive
Re: [Question #683856]: Segmentation fault (core dumped) after erase some bodies
Question #683856 on Yade changed:
Status: Open => Answered
Jan Stránský proposed the following answer:
after findBodiesToBeDel, some bodies BodiesToBeDel multiple times (each body may be associated with multiple interactions).
Then in findBodiesToBeDel, you erase some bodies, but then you try to erase the same ID (which would be OK), but you try to get the id as "i.id", but "i" was already erased and (probably, did not investigated it more) was deleted in C++, ending in segmentation fault.
Try it with set using ids, something like:
IdsToBeDel = set()
for i in Ids:
for j in Ids:
for i in IdsToBeDel:
You received this question notification because your team yade-users is
an answer contact for Yade.