Boost logo

Boost Users :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2006-07-07 18:50:42


Hi,

The function has the following assert when trying to the destroy a named
object by name:

       //Try to find the name in the index
       index_it it = index.find(key_type (name,
           std::char_traits<CharT>::length(name)));

       //If not found, return false
       if(it == index.end()){
          //This name is not present in the index, wrong pointer or name!
          assert(0);
          return false;
       }

This function can be called also when destroying an named/unique object
by pointer, to erase the name entry from the map.

That means that the code is trying to destroy a named object that does
not exist (perhaps previously erased?) in the index that tracks
named/unique objects. I just don't know why this function is called when
you call close(). I would need more information. Could you just check if
that destructor does anything apart from closing the segment (if any
base or member has object destruction logic), and print the parameter
"name" just before the assertion so that I can have more clues?
Otherwise I'm afraid I can guess the cause...

Also, could you tell me more about your platform/compiler?

Regards,

Ion


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