Germán Diago: ... std::vector<boost::shared_ptr<DerivedClass> > result(get_base_objects.size()); You're creating a vector full of NULLs here. :-)
std::vector<boost::shared_ptr<DerivedClass> > result(get_base_objects.size());