osgViewer::Viewer frame() gives Warning:: Picked up error in TriangleIntersect

classic Classic list List threaded Threaded
4 messages Options
krzysief krzysief
Reply | Threaded
Open this post in threaded view
|

osgViewer::Viewer frame() gives Warning:: Picked up error in TriangleIntersect

This post was updated on .
Hello, I've got an osg window embedded into qt layout, and when switching the layouts, window containing map has to be resized. Unfortunately from time to time when i change the layout osg window freezes and gives me this messages in the output:

Warning:: Picked up error in TriangleIntersect
   (-359320 -1.61982e+06 -219034, -351189 -1.58314e+06 -358871, -240038 -1.90058e+06 -293718)
   (-nan, -nan, -nan)
Warning:: Picked up error in TriangleIntersect
   (-234607 -1.85755e+06 -431865, -240038 -1.90058e+06 -293718, -351189 -1.58314e+06 -358871)
   (-nan, -nan, -nan)
Warning:: Picked up error in TriangleIntersect
   (-240038 -1.90058e+06 -293718, -234607 -1.85755e+06 -431865, -120167 -2.17679e+06 -383117)
   (-nan, -nan, -nan)
Warning:: Picked up error in TriangleIntersect
   (-117448 -2.12751e+06 -519242, -120167 -2.17679e+06 -383117, -234607 -1.85755e+06 -431865)
   (-nan, -nan, -nan)
Warning:: Picked up error in TriangleIntersect
   (-120167 -2.17679e+06 -383117, -117448 -2.12751e+06 -519242, -3.35438e-11 -2.44776e+06 -487015)
   (-nan, -nan, -nan)
Warning:: Picked up error in TriangleIntersect
   (-3.01509e-11 -2.39235e+06 -620789, -3.35438e-11 -2.44776e+06 -487015, -117448 -2.12751e+06 -519242)
   (-nan, -nan, -nan)


I tracked that they came from inside osgViewer::ViewerBase::frame() member function, this is my code for resizing:

if(resize)
        {
                resize = false;
                graphics_window_embedded->resized(0, 0, width, height);
                graphics_window_embedded->getEventQueue()->windowResize(0, 0, width, height);
                graphics_window_embedded->requestRedraw();
                update_viewport(width, height);
        }

viewer->frame();

osgEarth 2.9
osg 3.4

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgViewer::Viewer frame() gives Warning:: Picked up error in TriangleIntersect

krzysief,
This message comes from the OSG class IntersectVisitor which is now deprecated. It had precision problems. So the NaNs could be the result of a bad matrix, bad geometry, or precision truncating. Use IntersectionVisitor instead and upgrade to OSG 3.6.3+ if you can.
Glenn Waldron / Pelican Mapping
krzysief krzysief
Reply | Threaded
Open this post in threaded view
|

Re: osgViewer::Viewer frame() gives Warning:: Picked up error in TriangleIntersect

Glenn, thanks for your reply!

For now i must stick to OSG 3.4 but i found the exact problem: when i have a mouse in some position and i switch the layout quickly getWorldCoordsUnderMouse(...) function doesn't work correctly and throws warning because mouse isn't in the map window area, is there a way to prevent that behavior or switching to newer OSG is the only fix for that?

~Kris
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgViewer::Viewer frame() gives Warning:: Picked up error in TriangleIntersect

This post was updated on .
Even osgEarth 2.9 used the newer IntersectionVisitor, so I don't know where the TraingleIntersect error is originating. You may need to set a breakpoint and find out.

[edit: version number]
Glenn Waldron / Pelican Mapping