==23649== Invalid read of size 4 ==23649== at 0x36219276: std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_leftmost() const (stl_tree.h:651) ==23649== by 0x386EF33E: std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin() const (stl_tree.h:772) ==23649== by 0x386E968C: std::map, std::allocator > >::begin() const (stl_map.h:236) ==23649== by 0x387A3F92: crease::get_sharpness(k3d::split_edge const&) (sds_crease_algorithm.cpp:838) ==23649== Address 0x28 is not stack'd, malloc'd or (recently) free'd //code for get_sharpness: double get_sharpness(const k3d::split_edge& Edge) { for(k3d::parameters_t::const_iterator tag = Edge.tags.begin(); tag != Edge.tags.end(); ++tag) { // the next line causes the segfault if(tag->first == "crease" && (tag->second.type() == typeid(k3d::ri::real))) { return boost::any_cast(tag->second); } } return 0.0; }