Archived

This topic is now archived and is closed to further replies.

Hunter-Killer

Serious issues in NeHe base code!

Recommended Posts

I upgraded to Windows 2000 recently which is 32bit and runs in protected mode. Well after a week or so I started just rashing uinstanting when a program would do something. After a couple calls to Microsoft I learned that in NT when the software tries to gain access to the hardware it says "i dont think so" and kicks your ass out. There are 2 things I have found that cause this. One is starting a download with mutliple mirrors with DAP while running Media Player. The other is the fullscreen code used in every GL tutorial on this site. What happens is it tries to change the screen settings but the attempt gets half assed so windows returns an error and as soon as you try to create the message box it crashes. The tech said that 9x wasnt supposed to allow hardware control either but it was more tolerent than NT. The exact stop error is 0x0000001E. This really needs fixed. Hunter-Killer

Share this post


Link to post
Share on other sites
Read the disclaimer, what you call "half assed" has helped thousands of budding developers.

If you want to point out a bug, point it out. Don't go on some tirad against someone busting their hump to help us out.

As for your comments on Win2k. A large number of us DO use Win2k for our development, and I have yet to see anyone make comments such as yours. I have used the pascal equivalents of NeHe's code many times and never once caused access violations using his resolution or context code.

Care to explain a little with more patience and show us the bad segment instead of ranting?

Jason

Edited by - DeschutesCore on March 22, 2001 8:26:05 AM

Share this post


Link to post
Share on other sites
I''m not sure if I''d call this post ranting, but it doesn''t seem like it has a purpose. Is NeHe supposed to re-write all his programs for you? Perhaps if you could actually find the specific problem (and on of those error codes that M$ spits at you really isn''t of any use), then someone could fix it. I also use NT 5, and everything works fine for me.

On another note, I don''t even believe that there is any hardware access, or anything at all for that matter, done before fullscreen prompt. Your problem confuses me.

Share this post


Link to post
Share on other sites
NeHe has provided us with very good code. At the very leat you could be thankful instead of critical. If you see and "issue" point it out with the respect that NeHe deserves. Without NeHe you would be completely lost...

I think that a public apology is in order for NeHe...

If you are not man enough for that, then perhaps you should stop posting here all together if NeHe is so "troublesome" for you...

Share this post


Link to post
Share on other sites
actually, i have a problem w/ the fullscreen part too. the prog crashes and gives me a blue screen upon exit. what i do to fix it is to kill the window first and THEN reset the resolution. i think it''s more of a vid card driver issue(maybe ur card''s manufacture wrote poor drivers for win2k?). cuz this problem gets fixed if i turn off 3d accel.

btw, i''m using a viper2 on win2k.

life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it

Share this post


Link to post
Share on other sites
quote:
Original post by Hunter-Killer

I upgraded to Windows 2000 recently which is 32bit and runs in protected mode.


Ehm..... Win9x does also run in protected mode and even win 3.11 runs in protected mode...

Share this post


Link to post
Share on other sites
Perhaps your sysadmin (if your''e not home)?? have restricted your permissions so you simply arn''t allowed to change the vidmode..

Btw, I code in win2k (pro) and I havn''t had any problems at all.



return 1;

Share this post


Link to post
Share on other sites
I''ve been running OpenGL fullscreen apps in Win2k for almost a year and haven''t had a single crash! My advise would be to use the debbuger to step through your program and find the exact function call that causes the crash. Then return here and post a usefull question that includes information like...
OS: Win9x, Win2k, etc...
Vid Card: GeForce2mx, Voodoo3 2000, S3 Virg/GX, etc...
Language: C/C++, VisualBasic, Pascal, etc...
Compiler: MSVC, Borland C++, Delphi, etc...
Error: i.e.
The code from nehe''s Lesson 1 tutorial crashes whenever it calls "somefunction" in fullscreen mode. Can anyone tell me why this is?

Then instead of getting ripped on you''ll probably get solutions to your problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, this is a driver problem. You should really post information about card and drivers.

ChangeDisplaySettings can change _more_ on NT based systems than on 9X. Can GLUT programs use fullscreen gamemode? Another thing to try is the parameters to ChangeDisplaySettings. Does it work with only a resolution change?

Share this post


Link to post
Share on other sites
Good lord. Isn't this what NeHe was trying to prevent? Everyone else was pricks and wouldn't bother to help? The reason I know it's the code is that all my other games work fine in fullscreen. But I'm not even going to bother explaining because if I'm going to get this kind of response for trying to point out a possible problem then I dont even want to be here. Did anyone even notice someone else had this problem or read my entire post? I mean asking what OS i'm running isnt the most intelligent question to ask when my entire post deals with 2k and NT technology. As for the second reply to my post. So by reseting my display to 640x480 illeagaly then creating a msg box and crashed my system has helped thousands of budding developers? Wow didnt know my PC had that much influence on the world.

Edited by - Hunter-Killer on March 21, 2001 9:32:28 PM

Share this post


Link to post
Share on other sites
You still haven''t told us what video card you have. Your video card may have bad Win2K drivers, and therefore may not like something that the Nehe tutorials make it do.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites
Since you bring my post up, what is it you have issue with? The fact that these tutorials have helped thousands of people (easily proven), or the fact that you attacked perfectly valid code by calling it half assed.

Let's walk through your post for a moment.
"I upgraded to Windows 2000 recently which is 32bit and runs in protected mode. Well after a week or so I started just rashing uinstanting when a program would do something."
Ok, so it took a week for his code to start crashing, that's odd.

"After a couple calls to Microsoft I learned that in NT when the software tries to gain access to the hardware it says "i dont think so" and kicks your ass out."
You had to call Microsoft just to find out that validity of some basic OpenGL tutorials?

"There are 2 things I have found that cause this. One is starting a download with mutliple mirrors with DAP while running Media Player."
Corelation? (Translation: What does this have to do with your problem at hand?)

"The other is the fullscreen code used in every GL tutorial on this site."
Which you claim took a week to start crashing on you.

"What happens is it tries to change the screen settings but the attempt gets half assed so windows returns an error and as soon as you try to create the message box it crashes."
And what is it that's 'half assed' about ChoosePixelFormat, wglCreateContext, etc...?

"The tech said that 9x wasnt supposed to allow hardware control either but it was more tolerent than NT."
Hate to break it to you, but the code DOES NOT control hardware...it interfaces with the Windows GDI and OpenGL, all perfectly valid and in line with MICROSOFT'S VERY OWN OPENGL SAMPLE CODE.

"The exact stop error is 0x0000001E. This really needs fixed."
If you got off your ass and looked at Yahoo instead of looking to MS you would have solved your problem already.

---
"Stop 0x0000001E" Error Message After Changing Color Depth" found at http://support.microsoft.com/support/kb/articles/Q260/9/82.ASP

So now that we know setting the color depth is causing your problem, let's try a solution by looking at
"if (!CreateGLWindow("NeHe's OpenGL Framework",640,480,16,fullscreen))" and the related calls to ensure that a 32 bit or other unsupported color depth is not called.

Jason


Jason

Edited by - DeschutesCore on March 22, 2001 8:32:27 AM

Share this post


Link to post
Share on other sites
you know i dont use OGL and i can tell you its your hardware, not the code
by the sound of it all your trying to set a color depth that your card dont like
it maybe that your card only uses X1R5G5B5 and not R5B6G5 somthing smail like that would do that..

or you may be trying to tell it to use 32-Bit color when it only has upto 24bit



-VBLimits
Sorry about the Spelling..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
humm, I have no problems with Nehe code.
However in just around all 3d apps I have, If I run them in full screen some times the netire thing just locks up. I read somewhere about win2k haveing problems with a AMD processor, something about the loss of AGP data. This isnt really the place to ask, but could this be the problem.

This has happened in both OpenGL apps and Directx apps

I have a AMD thunderbird 800, win2k pro, and an old nvidia vanta LT (got it for 10$)

thanks.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You could enter the BIOS setup when your computer starts. Try to set some slower settings for the memory.

Share this post


Link to post
Share on other sites
Hey guys, I appreciate you jumping to my defense, but Hunter-Killer has a valid point. I am aware of problems on NT and 2000. In the most recent code lesson 32 the problem should be fixed (the settings are stored so they can be safely recalled). I''ve had alot of problems with fullscreen code over the last year. What works on one OS does not always work on another. Sometimes changing your driver fixes the problems, other times it does not.

I did run both NT 4.0 and 2000 at one point in time, and the most severe problem I had was the start bar getting messed up in NT 4.0. So I''m not able to recreate the problem. So to anyone able to fix the fullscreen code, I am publicly offering $25 and a FREE CD.

How''s that for incentive? It has to be compatible across all platforms, and I would prefer it doesn''t use DirectX or an external library. Sorry the offer isn''t great, I''m low on money at the moment


Share this post


Link to post
Share on other sites
Just wanted to post another quick comment. I dont mind gentle ribbing, I don''t mind people pointing out flaws, it''s the ONLY way things will get better around here. Just keep in mind that all my stuff is free, and I don''t get anything out of running this site, or by replying to all the emails I receive. If I was charging you to view the tutorials then yeah, you could attack me if something was wrong, but as is, I''m just trying to give you a stepping stone to get started. Along the way I hope you''ll develop your own styles, your own routines, and listen to what some of the absolutely brilliant people in this forum have to say in regards to making things even better.

One thing that someone brought up is the amount of code on the site. You have to keep in mind that a bug in the base code means I have to rewrite all 32 tutorials. I''d rather point out the mistake, and include the fix in a future tutorial. The work is just too much, especially when the fix is minor.

The next tut should have some nice modifications... minor but things that will help. Such as libraries automatically included, defining TRUE/FALSE, etc... so the odd compiler doesn''t choke, etc.

Thanks again for all the feedback! Play nice


Share this post


Link to post
Share on other sites
Hunter-Killer said that "it tries to change the screen settings but the attempt gets half assed so windows returns an error" not that OpenGL or NeHe's tutorials are "half-assed" - why do you deliberately mis-represent him?

If there are known issues with nt/win2k then surely he can suggest that some more experienced person than himself try to fix them, without being flayed alive? I know myself that it's frustrating to experience unexpected problems when you are learning - I think some more tolerance is in order .

Paulcoz.

Edited by - paulcoz on March 28, 2001 1:27:11 AM

Share this post


Link to post
Share on other sites