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/

Reply via email to