HI Hagen,

I think there is a good chance that this is false reading or perhaps a
bug in your setup/environment.

FYI, the intersection visitor isn't multi-threaded so there will be no
need to enforce thread safe ref/unref.

Robert.

On Tue, Jul 22, 2008 at 9:38 AM, Kaiser, Hagen (CT)
<[EMAIL PROTECTED]> wrote:
>
> Hello everyone,
>
> I using the following code:
> Is it a bug? Its used inside C++/CLI Environment but inside a pure native
> class.
>
> This was halfways copypasted from one of the examples. It's a function
> inside a GUIEventHandler called in cas of a GUIEvenetAdapter::REALESE:
>
> void pick(const osgGA::GUIEventAdapter& ea, osgViewer::Viewer* viewer)
>         {
>                 osgUtil::LineSegmentIntersector::Intersection intersection;
>                 osg::Node* scene = viewer->getSceneData();
>         if (!scene) return;
>
>                 /*osg::Node* node = 0;
>         osg::Group* parent = 0;*/
>                 osg::ref_ptr<osgUtil::LineSegmentIntersector> picker;
>         picker = new osgUtil::LineSegmentIntersector(
> osgUtil::Intersector::PROJECTION, ea.getXnormalized(),ea.getYnormalized()
> );
>
>                 picker->setThreadSafeReferenceCounting(true);
>         <---Thought this could solve the problem but didnt change anything
>
>                 picker->setThreadSafeRefUnref(true);
>         <----Same here
>                 osgUtil::IntersectionVisitor iv(picker.get());
>                 viewer->getCamera()->accept(iv);
>                 if (picker->containsIntersections())
>                 {
>                         intersection = picker->getFirstIntersection();
>         <---THIS LINE THROWS AN ERROR
>                 }
>                 return;
>         }
>
> I get the following error:
>
> The output window may have more diagnostic information.
> HEAP[interfaceD.exe]: Invalid Address specified to RtlFreeHeap( 02170000,
> 11395350 )
> Windows has triggered a breakpoint in interfaceD.exe.
>
> This may be due to a corruption of the heap, which indicates a bug in
> interfaceD.exe or any of the DLLs it has loaded.
>
> This may also be due to the user pressing F12 while interfaceD.exe has
> focus.
>
> The output window may have more diagnostic information.
> The program '[840] interfaceD.exe: Managed' has exited with code 0 (0x0).
> The program '[840] interfaceD.exe: Native' has exited with code 0 (0x0).
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to