Hi all, i'm trying to implement PickHandler in my application with osg 1.2. Following example osg::pick i have written the following lines of code:
bool PickHandler::pick (const double x, const double y, osgProducer::Viewer* viewer) { std::vector<osgUtil::Hit> hlist; if ( viewer->computeIntersections(x, y, hlist) ) { //Here i handle the information recovered from computeIntersections() hlist.clear(); } return true; } Im working under Windows: the resulting application works well if i compile it in release mode but when use in debug mode it give me the following error on instruction hlist.clear(). If i don't call this instruction it give me the same error at the return (because the application try to empty Heap). Debug Assertion Failed File:dbddel.cpp Line:52 Exception: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). I have tried to comment the code containing computeIntersection and all works well. It seems that computeIntersections function do something on hlist, avoiding to empty memory. How can i resolve this problem? Does exist another functionto to have the same behaviour? How can i try to resolve this problem? Thanke in advance Francesco Argese _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org