PDA

View Full Version : nVidia OpenGL driver bug



11-15-2000, 11:01 PM
Suddenly, my program stopped working, and it
didn't start working (i e drawing stuff to
screen) until after a re-boot.

This is with Detonator 3 drivers on W98SE.
I got in this state by quitting my app with
shift-F5 in MSVC debugger while in the
middle of a GL_TRIANGLES rendering pass.

Bad clean-up? Tsk tsk :-) (And I'm only
posting here because I'm too lazy to look up
the e-mail address where it should go, so
tsk on myself, too :-)

BK
11-15-2000, 11:28 PM
I get a similar thing when my stuff under development all too frequently crashes, but I never assumed that the driver should clean up for me if my app is terminated without my clean up kicking in.

I would be just as happy if someone could tell me how to the 'reset' the driver without a reboot, although it does free up time for that long awaited cup of coffee to be made http://www.opengl.org/discussion_boards/ubb/smile.gif

vtstv
11-16-2000, 12:52 AM
Hear, hear...

I was just going to ask this myself. With my program,
it can survive three crashes and after that I have to reboot. It's very annoying. Some kind of "reset" would be great...

I wasn't going to blame the driver... http://www.opengl.org/discussion_boards/ubb/smile.gif

LordKronos
11-16-2000, 04:06 AM
I used to get the same problems all the time. After upgrading to Win2K, it hasnt happened a single time. Probably not the solution you're looking for, but...

mandroka
11-16-2000, 04:34 AM
Try the following:
Go to the display properties window and change the resolution. In the "are you sure you want to kepp..." message box click cancel.

It used to work for me when I use Maya and it slows down like hell (from 20-25 fps to 1 fps). After this change everything's fine again.

Hope this helped.

Siwko
11-16-2000, 04:38 AM
Damnit! Kronos too my suggestion! http://www.opengl.org/discussion_boards/ubb/smile.gif

Anyways, I was going to flat out ask:

"And you're trying to develop on a Win9X machine??? No wonder you're having problems."

Seriously... I understand that its nice to develop for the platform you're targeting, but in Win32... you sure as hell get a lot more stability and performance out of a Win2K platform. I've been developing OGL apps for the past 4 months, and I haven't rebooted yet.

Okay... I lied, I have rebooted. But it has honestly had nothing to do with developing. Mostly issues with IE55 and stuff.

Siwko

mandroka
11-16-2000, 06:19 AM
Seriously... I understand that its nice to develop for the platform you're targeting, but in Win32... you sure as hell get a lot more stability and performance out of a Win2K platform.

If you're in games development you should support w9x/me at least for marketing reasons. The best thing is you write your code to run on 2k too.

If you're in the app/dev tools line you can let youselft supporting only 2K or NT.

Blaze
11-16-2000, 06:55 AM
If you're developing for win32, then you should always support both win9x and win2k, but I think the point is that developing under win2k is less painfull.

And besides that, I think that developing under win2k will generate better programs than developing under win9x.

[This message has been edited by Blaze (edited 11-16-2000).]

11-16-2000, 09:16 AM
Sorry, I don't have the $500 to blow on W2k.

When I want stability, I run BeOS. I only
develop for Win32 under W98SE because it's
useful to learn that API, and it came
conveniently pre-installed on my machine.
Oh, and that BeOS port of EverQuest still
seems to be vapourware :-)

Of course I blame the driver. It's the job
of the driver to clean up when clients go
away unexpectedly. Since the client is going
away, IT can't very well clean up, now can
it? Of course, it's the job of the kernel to
afford the driver the opportunity to clean
up in the first place; perhaps ending a
debugging session like this confuses the
kernel to the point where it doesn't. But I
sincerely doubt it's THAT bad.

Siwko
11-16-2000, 09:29 AM
Originally posted by bgl:
Sorry, I don't have the $500 to blow on W2k.

When I want stability, I run BeOS. I only
develop for Win32 under W98SE because it's
useful to learn that API, and it came
conveniently pre-installed on my machine.
Oh, and that BeOS port of EverQuest still
seems to be vapourware :-)

Of course I blame the driver. It's the job
of the driver to clean up when clients go
away unexpectedly. Since the client is going
away, IT can't very well clean up, now can
it? Of course, it's the job of the kernel to
afford the driver the opportunity to clean
up in the first place; perhaps ending a
debugging session like this confuses the
kernel to the point where it doesn't. But I
sincerely doubt it's THAT bad.

(Chuckle) http://www.opengl.org/discussion_boards/ubb/smile.gif

Well, you'll never ever get stability on a Win9X platform. Its just not physically possible. Even if you thought it was, the Win9X platform would still crash every 43 days like clockwork, assuming you could get it to stay up that long. Its just one of the physical inadequacies of the product. Thats why WinME is the last of its breed (The Win9X core). Thank god.

But my question is, why would you be spending $500 on Win2K? I bought my copy for $89. And thankfully, I have access to MSDN Subscriber Downloads through work. So - I can get it for free. But really though, $89/$100-level really isn't a bad deal for what really is a more advanced operating system, that to the contrary of everyone else's opinion, can run everything (including games) without fail. And for a dev platform, it beats everything (simply because its Win32 - no offense though, I haven't had the pleasure of writing for Be).

As far as the driver cleanup issue goes... I have a question... if the client crashes mid cycle, and the driver is still running... the client is no long there and did not "gracefully" exit, then how, pray tell, is the driver to even know it must clean itself up?

Siwko

phlake
11-16-2000, 09:36 AM
sure. nobody uses windows for stability. the point is, if you have to develop on windows, use win2k. it's obviously superior to win98. win98 is just awful, and no one who knows better (eg, software engineers) should fool with it. and why? because it doesn't properly protect against faulty programs. and programs in development seem to spend a lot more time being faulty than not. you'll still need a win98 box to run intermediate "stable" builds on, for testing, but... development? bah.

blame the drivers if you want. but take this anecdote into account: one night, my computer crashed -- i was running win98 -- so i diligently rebooted. then i went out to dinner, saw a movie and came back home. i hadn't touched the machine after it rebooted. it was locked up solid. and i said to myself, "self, what kinda piece of sh*t operating system crashes when sitting idle for three hours?" and i installed win2k the next day.

i'm not saying i haven't had problems with it. it seems to freak out about once a week or so. but once a week is a hell of a lot better than every hour or two. so. us the the right tool for the job, is all.

Michael Steinberg
11-16-2000, 10:18 AM
Uhhmmm. Just a guess. Sure, Windows 98 is nor stable. But if you're developing on it, the system will not crash because windows is written bad. Get what I mean?
I'm now developping in C on windows 95/98 since 2,5 years, and I did not have to restart the machine yet, unless the opengl driver didn't get to unload my textures after my program crashed.
And that problem is again mine, since quake3 runs perfectly after that crash, and after I've run q3, I also get good performance in my engine again.

So, I think the main part of this problem is the programmer, and I include me!

mcraighead
11-16-2000, 10:29 AM
This is a Microsoft OS bug that we are trying to find a way to work around, but it may or may not be possible.

When you do "Stop Debugging" in the MSVC IDE, the program shuts down but we don't get a process detach or any other opportunity to free up resources.

The result is that every time you do this, we leak tons of HW resources. Eventually we run out.

We could garbage-collect the resources, but this would require knowing when they weren't in use. Since we don't know when this happens, there is no difference (from our point of view) between Stop Debugging and an app that is just doing nothing. So if we, say, freed any OpenGL-allocated resource that hadn't been used for 5 minutes, if you let a program sit for 5 minutes, it'd stop working when you came back.

No easy solution.

- Matt

Michael Steinberg
11-16-2000, 10:33 AM
Wouldn't it be possible to tell the driver that there are *NO* applications running using opengl? A simple tool that would do that, I mean. I could need something like that for developing...

How does q3 do that? When my "engine" crashes and was unable to unload the textures before, and this happened a few times, after a new restart it crawls. When I run q3, it works beatifully, and afterwards my "engine" also again. How that? thnx

[This message has been edited by Michael Steinberg (edited 11-16-2000).]

11-16-2000, 07:56 PM
Siwko> if the client crashes mid cycle, and
S> the driver is still running... the client
S> is no long there and did not "gracefully"
S> exit, then how, pray tell, is the driver
S> to even know it must clean itself up?

One of the major roles of a kernel is to do
resource tracking, and take care of clean-up
when resources are no longer needed (such as
the process that used them going away).

Thus, if the driver is still "running" (I
would call it "open" or possibly "loaded"
because a driver isn't a process on most OSes
with any kind of performance) the kernel
should tell it that the client went away,
and please would it deallocate its resources
and go away? Ideally, the kernel would make
this look just like a regular close operation
because, to the driver, there shouldn't be
any difference (you can never trust that a
user program will be "graceful" anyway).

Siwko> thankfully, I have access to MSDN
S> Subscriber Downloads through work. So - I S> can get it for free.

If I did that, I would consider it to be
against my personal morals.

mcraighead> When you do "Stop Debugging" in
m> the MSVC IDE, the program shuts down but
m> we don't get a process detach or any
m> other opportunity to free up resources.

Ah, so it reallly is THAT bad. Shucks.

As an off-the-cuff idea from someone who has
never written a Windows driver: could you
keep a list of all client processes, and each
time someone opens you (attaches?) you poll
all the processes for existence? Hardly an
elegant suggestion, but at least simple :-)

Siwko
11-17-2000, 06:39 AM
Originally posted by bgl:
One of the major roles of a kernel is to do resource tracking, and take care of clean-up when resources are no longer needed (such as the process that used them going away).

Read what you wrote... "Kernel", not "Driver". You just answered your original question.


Siwko> thankfully, I have access to MSDN Subscriber Downloads through work. So - I can get it for free.

If I did that, I would consider it to be
against my personal morals.


Uhh... when its legit access, what's so immoral about it?

Anyways, I think you've managed to answer your original question, or at the very least have it answered for you.

Basically, you need to remember this. Win9X was never, ever from day one designed for stability. It was designed for "compatibility". On the other hand, WinNT (thru 2K, Whistler is another story) WAS designed for stability, not compatibility. Its a double edged sword.

And to answer the other question of why Quake3 is so stable after a crash, and I'm am not trying to offend anyone here, but the designers of these commercial pieces of software are literally the cream of the crop. They are paid to know every single trick and technique to squeeze every ounce of performance and stability out of their product. Please keep in mind that these product development cycles are measured in years, not months as most (please don't read into this) of us amateur developers are accustom to. It also helps that they have a full-time dedicated staff whose sole purpose is to track down those sort of bugs.

And I'll tell you this as a final note. Go and ask any professional developer in the field (Windows programming of course) what OS they use to develop on and why. I guarantee that 99% will say WinNT/2K, for stability.

Bgl, I understand that your resources are limited. I have a company backing my MSDN access, and another backing my personal work. But please... remember this, if you have the means, utilize it.

I wish you the sincerest best wishes and luck on your development projects. If I can be of any other help, don't hesitate to ask.

Siwko

PS - I'm sorry for the... uh... lecture. It just pains me when I see people in need that have limited resources. Thats why I wish MS and others would embrace the dev community, and subsidize at the very least. Oh well... I can dream can't I? http://www.opengl.org/discussion_boards/ubb/smile.gif

mcraighead
11-17-2000, 08:33 AM
I'm not so sure about the Q3-after-a-crash thing.

I know for a fact that if I'm running Q3 on Win98 and I have some stupid driver bug that I can't find and Q3 crashes enough times on me, things stop working. I then have to reboot.

Fortunately, I now run exclusively Win2K. Win2K has this bug fixed.

- Matt

Michael Steinberg
11-18-2000, 09:11 AM
I ended up installing Win2k now. But the MSDN (VC++ 6.0) doesn't work with it. Do I need a SP for that?

Blaze
11-19-2000, 03:46 AM
I had some problems istalling msdn once. Somehow the installer doesn't work after i had installed something. So every time i reinstall i start by installing visual studio, msdn and then all kinds of other stuff.

Do you get an error from the msdn installer at some point?

Siwko
11-19-2000, 04:22 PM
Originally posted by Michael Steinberg:
I ended up installing Win2k now. But the MSDN (VC++ 6.0) doesn't work with it. Do I need a SP for that?

I'm sorry, I might have mistaken you folks. Are you referring to the MSDN library that comes with VC++ or VS?

I'm referring to a subscription service (which includes MSDN library) that Microsoft provides that is called "MSDN Subscriber Downloads". This is a $2000 yearly subscription that my company springs for. It allows you to download things such as any flavor of windows, Visual Studio, SDK's... everything (Including Whistler Beta).

Siwko

pleopard
11-21-2000, 08:30 AM
Back to the original topic ...

I have Win98/GeForce2 at home and WinNT4/GeForce2 at work. Every day I take my work code home and compile/run it at home. I get the same problems with WinNT at work but not on Win98 at home .... serious performace issues ...

I found a perfectly working solution... I have to re-install my GeForce2 driver on my WinNT box each morning at work. Sometimes I have to re-install it several times a day. What a joke...

The Win98 box? notta prob at all...

Thinking seriously about going to W2K at work now...

Gabriel
11-21-2000, 01:34 PM
I found something strange with my Gefroce2, I use driver 6.31 and when I use evaluators, GL_FRONT and GL_BACK are inverted for back face culling. I mean, when I use glCullFace (GL_BACK) glFrontFace (GL_CCW), only front face is culled and no light is applied to the back face http://www.opengl.org/discussion_boards/ubb/biggrin.gif ... I took the code directly from the red book. (example 12-2 and 12-3)

mcraighead
11-21-2000, 02:08 PM
Hmmm, on the evaluators, I think I know what the problem is, and it actually looks like the same bug exists in the SI, so I'm guessing that there are _many_ OpenGL drivers that have the same bug. In fact, the SI implementation does not comply with the OpenGL spec. (!)

- Matt