Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index_container assertion after crash
From: joaquin_at_[hidden]
Date: 2009-10-19 06:48:37


[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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net