
Peter Dimov wrote:
Stephen Torri wrote:
void add_Component ( Component::ptr_t obj_ptr ) { bool no_duplicate; IdVertexMap_t::iterator pos; Vertex_t node;
if ( obj_ptr.get() == 0 ) { std::cerr << boost::format("Exception throw in %s at line %d") % __FILE__ % __LINE__ << std::endl;
return; }
boost::tie (pos, no_duplicate) = m_index.insert (std::make_pair(obj_ptr->get_ID(), node));
MSVC 8 says that you're using an uninitialized 'node' variable here. Is this intended?
Not likely since this leads to a fault in property_map.hpp:351 where iter is advanced past the end of the sequence. You might want to investigate how to activate the debug mode of your standard library implementation, if it supports one; this is invaluable in hunting down such iterator errors. Your compiler probably warned about the uninitialized variable, too; it's easy to miss an important warning if it's buried in a flood of harmless ones, but spotting the problem early because of it can be a real time saver.