
Joaquín hi, a) it's end() because the lookup condition was not met? - I am checking it before trying to erase. b) it's invalid because you already deleted the element it was pointing to? - No, I am looking for a record and then the first time I try to erase it, it happens. c) it belongs to a different container? Have you swapped containers, maybe? -No way. I've checked it 1000 times, and this is the same code that is used in my regular run and I had never experienced such problems (in this phase of the flow, this piece of code). Only when testing after crash the assertion pops up in 100% of the cases. Eli. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of joaquin@tid.es Sent: Monday, October 19, 2009 12:49 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] multi_index_container assertion after crash [Please don't top-post, see http://www.boost.org/community/policy.html#quoting ] Eli Zakashansky escribió:
Joaquín hi,
I understand perfectly what u tried to do (and also experienced such problems before), therefore I verified that after I obtain the index(idx = container->get<INDEX>();) it is not changes (only read methods such as end(), begin() etc. are invoked) until I try to remove an element from the container (idx.erase(iterator);), and on the first try I try to call erase the assertion pops up.
Well, where does iterator come from? Is there any chance that a) it's end() because the lookup condition was not met? b) it's invalid because you already deleted the element it was pointing to? c) it belongs to a different container? Have you swapped containers, maybe? Is this systematic, i.e. does it happen the first time that particular line of code is hit, or does it happen more or less at random? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users