View previous topic :: View next topic |
Author |
Message |
Irritant
Joined: 19 May 2008 Posts: 115 Location: Maryland
|
Posted: Wed Oct 14, 2009 4:35 am Post subject: Nvidia 191.xx drivers bugfix. |
|
|
Nice job Nvidia. 191.xx drivers blow up alot of Quake engines.
The fix is to replace vsprintf with _vsnprintf. Ugg.
Kirk Barnes gets credit for finding this... _________________ http://red.planetarena.org - Alien Arena |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Oct 14, 2009 9:20 am Post subject: |
|
|
If you're sprinting the gl extensions string into a buffer somewhere without checking the length of it, then its your own damn fault. Or more likely Id's...
Just copying any unbounded string of unknown length to a fixed-length string is always bad.
By using vsnprintf instead, you're truncating the string. There might have been something important in there.
Q1 engines crashed because of overlong extension strings years and years ago.
It surprises me that there are engines out there that are still susceptible.
Unless you're talking about something else...
If I remember correctly, NVidia provide some registry keys to choose which extensions to hide from apps. It just stops claiming it supports it. Feel free to cripple your drivers so that quake runs again without being fixed.
Note that GL_EXTENSIONS is depricated in opengl v3. There's a different mechanism that queries extensions by number instead. In part so that developers stop blindly copying extension strings into other buffers then strstring for the extension names they want... as that is also bad practice.
Strict opengl3 is annoying.
Sorry... But nvidia are not to blame.
Chances are they detect glquake and trim off some of the extensions that glquake never used... And no longer ever can. At least this is what will happen if you complain to them. _________________ What's a signature? |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
Posted: Wed Oct 14, 2009 9:30 am Post subject: |
|
|
You shouldn't be relying on querying the extension string anyway; we all know of drivers that report support for a particular extension but that don't actually support it properly, if at all. Best approach is to test for entry points (if applicable) and set up a flag indicating if a feature is present or not based on that. It's also worthwhile doing an API call (or calls) and checking the result of glGetError () as part of your setup.
Bottom line with OpenGL is that drivers cannot be relied on to behave themselves properly, so you need to take on responsibility for ensuring that stuff works yourself. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Irritant
Joined: 19 May 2008 Posts: 115 Location: Maryland
|
Posted: Wed Oct 14, 2009 2:38 pm Post subject: |
|
|
Yes, to clarify, the errors were occuring in the extension checking of quake 1 and quake 2 engines. Q3 fixed the problem using vsnprintf. _________________ http://red.planetarena.org - Alien Arena |
|
Back to top |
|
 |
Tomaz
Joined: 05 Nov 2004 Posts: 49
|
Posted: Wed Oct 14, 2009 2:46 pm Post subject: Re: Nvidia 191.xx drivers bugfix. |
|
|
Irritant wrote: | Nice job Nvidia. 191.xx drivers blow up alot of Quake engines.
The fix is to replace vsprintf with _vsnprintf. Ugg.
Kirk Barnes gets credit for finding this... |
That "bug" happened years ago. It's been fixed in just about any engine that has been run on anything newer than a GeForce 2 card.
A similar bug happens with the larger monitors of today, one of the arrays in gl_vidnt.c isn't big enough to hold all the resolutions the newer monitor/3d cards support. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
|
Back to top |
|
 |
Irritant
Joined: 19 May 2008 Posts: 115 Location: Maryland
|
Posted: Wed Oct 14, 2009 4:59 pm Post subject: |
|
|
This was something in the id code, nothing that other people put in.
Alot of engines didn't change this, contrary to what Tomaz posted.
This is really the first I'd heard of it. I've never experienced crashes because of this until the 191.xx drivers came out. _________________ http://red.planetarena.org - Alien Arena |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Mon Nov 02, 2009 9:54 am Post subject: |
|
|
another one to add
Code: | void Sys_PumpMessages (void) {
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
if (!GetMessage(&msg, NULL, 0, 0)) {
Sys_Quit();
}
sys_msgTime = msg.time;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Grab frame time
sys_frameTime = timeGetTime(); // FIXME: should this be at start?
} |
q2evolved crashes in this on windows 7 with cant read the expression. i applied the fix but still crashes here so not sure where the culprit may be. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
Posted: Mon Nov 02, 2009 12:46 pm Post subject: |
|
|
Just put the 191 drivers on my main machine. It seems that the cause of this is not actually the overlong extension string, but the fact that the "trim extension string" option in the Nvidia control panel defaults to false, and the list of applications which have special settings is substantially reduced (none of the Quakes are there). _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
|