Description of problem: openscenegraph fails when trying to load a 3ds file Version-Release number of selected component (if applicable): How reproducible: take 3ds file terrain.3ds from delta3d data package, and try osgviewer terrain.3ds Steps to Reproduce: 1. 2. 3. Actual results: Warning:: Picked up error in TriangleIntersect (330.151 57.2903 5445.48, 343.484 58.24 5672.46, 330.151 56.3407 5444.31) (nan, nan, nan) Warning:: Picked up error in TriangleIntersect (343.484 58.24 5672.46, 343.484 57.2903 5672.07, 330.151 56.3407 5444.31) (nan, nan, nan) Expected results: 3d terrain view Additional info: The bug is, IMHO, actually a g++ bug. See the more extensive description of #197349. Am filing it here too, so a temporary fix on OpenSceneGraph package can be made
I can reproduce the "TriangleIntersect" bug, I can not confirm your observation on g++. For me, using gcc-4.1.1-6, the "TriangleIntersect" bug is reproducable with both "-g" and ".g -O2". I am inclined to think the cause is a real functional/algorithmic bug in OSG, causing divisions by zero (the nans in your log above).
I learned something in the meantime. The problem is strict aliasing rules. Adding the option -fno-strict-aliasing creates a workable RPM. Of course, this is not a permanent solution, but for now it will do. Also OpenSceneGraph 1.1 has the problem. Proposed change to spec file: # Propagate RPM_OPT_FLAGS echo "OPTF = $RPM_OPT_FLAGS -fno-strict-aliasing" >> $dir/Make/makedefs
(In reply to comment #2) > I learned something in the meantime. Thanks for reminding me about his PR, I already had almost forgotten about it :( > The problem is strict aliasing rules. Hmm, -fstrict-aliasing is a fairly popular excuse, these days. In 90% of all cases, I have been struggling with it [1], in the end, the cause had been something else and not -fstrict-aliasing ;) [1] I am currently struggling with it in another project > Adding the option -fno-strict-aliasing > creates a workable RPM. Of course, this is not a permanent solution, > but for now > it will do. Also OpenSceneGraph 1.1 So, am I correct in presuming you tried it? Which architecture and which version of Fedora are you currently using? I'll try to reproduce your issue on fc6/i386 and check if -fno-strict-aliases fixes it ... If yes, I'll probably apply your "hack".
(In reply to comment #3) > Which architecture and which version of Fedora are you currently using? > > I'll try to reproduce your issue on fc6/i386 and check if -fno-strict-aliases > fixes it ... If yes, I'll probably apply your "hack". I can't reproduce the original problem with terrain.3ds w/ OpenSceneGraph-1.2 on fc6/i386. So either this issue must have been fixed in GCC or in OpenSceneGraph-1.2. Réné should you be using FC5, could you try to rebuild FE6's OpenSceneGraph-1.2 rpm and try to reproduce the error (I don't have a system running FC5 anymore)? If this should fix your issue, I would be willing to take the plunge and upgrade fc5 to OpenSceneGraph-1.2, a step I so far had hesitated to do.
Have rebuilt the fc6 OpenSceneGraph-1.2 for fc5, and bug is indeed gone. I would say go ahead and create an fc5 OpenSceneGraph-1.2
(In reply to comment #5) > Have rebuilt the fc6 OpenSceneGraph-1.2 for fc5, and bug is indeed gone. I would > say go ahead and create an fc5 OpenSceneGraph-1.2 OK, I went ahead and pushed OpenSceneGraph-1.2 into fc5 ;)