Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-29-06, 07:09 PM   #1
EHeM
Beautiful Dreamer
 
EHeM's Avatar
 
Join Date: Jan 2006
Location: Western USA
Posts: 7
Default Interesting Little Bug

Definitely a developer's issue here. There is at least one (looks like two, possibly a small family of related ones) bug in glRotated() in 71.74. Yeah, I know, 71.84 is out, but I doubt that fixes this bug (known present in some later versions, no changelog entry).

glRotated(0.0, NAN, NAN, NAN) => NANs all over current matrix stack
glRotated(0.0, 0.0, 0.0, MAXFLOAT) => NANs all over current matrix stack (note some headers use HUGE instead of MAXFLOAT)
glRotated(360.0, 1.0, 1.0, 1.0) => not quite a NOP

One can argue about the first case, it is abusing the OpenGL API to some extent. I must argue that there is a well defined behavior for glRotated(0.0, X, Y, Z) for any set of X, Y and Z, mainly it should be a NOP. While setting X, Y and Z to such nasty values is abuse, this does not have a well defined behavior, so I think the former should take precedence. I'll note that Mesa fixed the first case around version 2.6 or so. This is a useful case as a direct conversion from the identity quaternion triggers this.

The second and third are good olde revenge of the floating-point numbers. I'm disturbed about the second case, that isn't abuse of the API by any definition and yet clearly corrupts the current matrix. The third is a minor failure, but a failure nonetheless.

In theory I've attached a simple test program for these cases. The first case is test #124. The second is tests #32, #36, and #56. The third is test #125. (note that these are simply the first ones, these do get touched multiple times) Pretty simple build, `gcc -std=c99 bug2.c -o bug2 -lGL -lglut`, will build on SunOS as well (alas I'm not in front of one, so I don't know whether it worked or if/how it failed); if you get an error about a non-constant initializer for values[4], add -DBROKEN_NAN. bug2.c is designed for fairly straightforward insertion into a QA suite. If you need a license other than GPL or BSD, just ask.
Attached Files
File Type: txt bug2.txt (7.0 KB, 104 views)
EHeM is offline   Reply With Quote
Old 09-29-06, 08:42 PM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Interesting Little Bug

I'm not really clear on what the expected & actual behavior is supposed to be for your test app. Can you please define it?

However, when I build & run your app, it fails immediately with:
ERROR: Function <glutCreateWindow> called without first calling 'glutInit'

Also, does this bug reproduce in 1.0-9625 or 1.0-8774?

And finally, please generate and attach an nvidia-bug-report.log.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 09-30-06, 01:25 AM   #3
EHeM
Beautiful Dreamer
 
EHeM's Avatar
 
Join Date: Jan 2006
Location: Western USA
Posts: 7
Default Re: Interesting Little Bug

Quote:
Originally Posted by netllama
I'm not really clear on what the expected & actual behavior is supposed to be for your test app. Can you please define it?
Well, ideally it will simply output text summarizing details of success/failure and details of failures. Less ideally, it might momentarily open a window.

Quote:
Originally Posted by netllama
However, when I build & run your app, it fails immediately with:
ERROR: Function <glutCreateWindow> called without first calling 'glutInit'
Oh, fun. Looks like there may be multiple flavors of the glut library floating around. I suppose the question is, how long until they diverge and someone comes up with a gluttony library that runs on top of the various glut libraries and makes them operate the same? That was mostly about keeping the initialization simpler and trying to avoid having glut actually open a window. Guess it needs the more complete initialization, revised version is attached.

Quote:
Originally Posted by netllama
Also, does this bug reproduce in 1.0-9625 or 1.0-8774?

And finally, please generate and attach an nvidia-bug-report.log.
Those versions won't work on my current turkey of a playtime machine. Did try it a while ago with somewhere in the 85-87 series on a friend's machine and it showed up. A nvidia-bug-report.log isn't going to provide any additional useful information.
Attached Files
File Type: txt bug2.txt (7.2 KB, 117 views)
EHeM is offline   Reply With Quote
Old 09-30-06, 01:28 AM   #4
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Interesting Little Bug

An nvidia-bug-report.log will provide useful information. Please attach one.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 09-30-06, 05:26 PM   #5
EHeM
Beautiful Dreamer
 
EHeM's Avatar
 
Join Date: Jan 2006
Location: Western USA
Posts: 7
Default Re: Interesting Little Bug

Quote:
Originally Posted by netllama
An nvidia-bug-report.log will provide useful information. Please attach one.
No, it won't. This issue spans multiple hardware and software generations. I've noticed it in a lot of places. All that will do is demonstrate my playpen machine really needs to be replaced. Since you insist, I have provided it. I hope you've looked at the the revised bug2.c? Since it won't have the problem you were mentioning.

I've seen it on a GF7900GTX512 with somewhere in the 85-87 range driver. I'm unsure whether I tested it on SunOS^WSolaris. I've also seen in in Apple's OpenGL implementation. I fear the Mesa library is about the only implementation that deals with this situation in the manner I view as "correct".

One can argue that this is trivial to work around (it is) and therefore too trivial to fix. One can also argue that the vector being invalid takes precedence over the angle being zero. I've yet to find a definitive answer as to which view is correct. I'm inclined to be ivory tower and say that with a zero angle (or multiples of 360 for that matter), no matter the vector glRotate*() should be a NOP.
Attached Files
File Type: log nvidia-bug-report.log (50.6 KB, 101 views)
EHeM is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
I got a computer bug!!! sillyeagle General Hardware 16 06-05-12 02:44 AM
GLX bug? (1.0-3123) marc NVIDIA Linux 2 09-21-02 04:58 PM
Nero5.5.9.9 & "Empty Start Menu Entries" bug !!! cenkog General Software 2 09-21-02 12:57 AM
Antialiasing bug in 31.00 drivers? Mark_fox NVIDIA Windows Graphics Drivers 7 08-26-02 02:48 PM
bug: clockspeeds/render/MX400 obiwan NVIDIA Linux 3 08-23-02 10:20 AM

All times are GMT -5. The time now is 10:20 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.