Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index_container assertion after crash
From: Eli Zakashansky (Eli.Zakashansky_at_[hidden])
Date: 2009-10-19 10:25:51


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_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of joaquin_at_[hidden]
Sent: Monday, October 19, 2009 12:49 PM
To: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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