Bug 197941 - OpenSceneGraph fails on 3ds files
OpenSceneGraph fails on 3ds files
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: OpenSceneGraph (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ralf Corsepius
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-07 10:49 EDT by Rene van Paassen
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2-1.fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-01 00:26:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 197349 None None None Never

  None (edit)
Description Rene van Paassen 2006-07-07 10:49:28 EDT
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
Comment 1 Ralf Corsepius 2006-07-10 06:14:12 EDT
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).
Comment 2 René van Paassen 2006-11-28 04:07:58 EST
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

Comment 3 Ralf Corsepius 2006-11-28 05:33:39 EST
(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".
Comment 4 Ralf Corsepius 2006-11-28 10:44:11 EST
(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.
Comment 5 Rene van Paassen 2006-11-29 02:34:12 EST
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 
Comment 6 Ralf Corsepius 2006-12-01 00:26:22 EST
(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 ;)

Note You need to log in before you can comment on or make changes to this bug.