Ive had similar problems, crashing in the destructor of the osgUtil::IntersectVisitor::HitList which was called at the end of the pick function (the pick function is not part of OSG, but you can watch it in the osgPick example).
I had two different problems, which leaded to the same crash: - As Robert said, my app was Multithreaded/Multithreaded Debug, and not their DLL variants. - The problem also appeared when I did a debug build against Release dll's of OSG. I haven't found a solution to this one, and it's a pity because I'm debugging my app in Release (my model takes too long to load with Debug osg dll's) ________________________________________ De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Robert Osfield Enviado el: sábado, 09 de septiembre de 2006 8:51 Para: osg users Asunto: Re: [osg-users] Problem with computeIntersections() HI Cesar, My best guess is that you've got two versions of the OSG installed, and your app is compiling against one and running against the other. Next up as a possibility would be not having the same compile options such as multi-threaded DLL's in your app. Beyond this I don't have much to recommend. The computeIntersection code is pretty regularily used and I haven't heard of any crashes associated with it, so I you might find it more profitable looking elsewhere first for what might be the cause. Robert. On 9/9/06, Cesar Ismael Mendoza <[EMAIL PROTECTED]> wrote: Hi, I'm trying to set up viewer for picking using osgpick as a base but I've run into a problem. What I've done is to put the relevant code from osgpick.cpp into code and header files which I then worked into my main program. I expected that this would just have the effect of displaying an HUD on each of my cameras as well as vertex information (like in osgpick), allowing me then to modify the code and get the functionality I need. However, this resulted in my program crashing. After some debugging, I found out that specifically, whenever I call the line: _viewer->computeIntersections(ea.getX(),ea.getY(),hlist()) the program crashes when it exits the function it was called in. I'm using VC++7, and Visual Studio gives me the following errors upon exiting the function (specifically, PickHandler::pick(const osgGA::GUIEventAdapter &ea)): Debug Assertion Failures: Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Expression: _CrtIsValidHeapPointer(pUserData) As well as various unhandled exceptions. I've been using two cameras on my renderSurface and the renderSurface comes up as a borderless window. I've set up the PickHandler to perform a pick upon RELEASE rather than FRAME, so I know that the HUD displays correctly on both cameras and that the PickHandler is functioning properly (if I don't call computeIntersections). I don't know what I've been doing wrong, since the code compiles without errors and I'm fairly certain I'm not referencing anything that's been deleted. Any help? Cesar Mendoza _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
