Archived

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

MeNoThere

OGL hates me... wglMakeCurrent crashes app

Recommended Posts

I downloaded lesson 1 from NeHe and it crashes when wglMakeCurrent gets called in the CreateGLWindow function. It seems to happen with all of the tutorials at NeHe. I upgraded my graphics card drivers to detonator 44.03, but it still doesn''t work... *cries* I''m running Windows 2000 Pro with SP3 and a dozen or so hotfixes.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
just wondering but Are you speaking of the *.exe''s that are in the zips or the ones that you are compiling form code you write/use

Share this post


Link to post
Share on other sites
if u are talking about the .cpp code of the tutorials and,if u are compiling it on the VS .NET,then i put an help that (i think) can resolve the problem) search in ..::Help to NewBies::..

what happen?LNK2019 ???

_,,,^Ó..ò^,,,_

Share this post


Link to post
Share on other sites
quote:
Original post by KosmiC_Khaoz
if u are talking about the .cpp code of the tutorials and,if u are compiling it on the VS .NET,then i put an help that (i think) can resolve the problem) search in ..::Help to NewBies::..

what happen?LNK2019 ???

_,,,^Ó..ò^,,,_



As I understand his problem, his program crashes but compiles .

PS: Linking errors existed in VS 6 too, you know...

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

Share this post


Link to post
Share on other sites
i didn't understand,u are compiling C++ code on VB? or u run *.exe of the C++ zip file and compile the VB file?

what's ur video card?

my english suck's sorry...

_,,,^Ó..ò^,,,_

[edited by - KosmiC_Khaoz on July 28, 2003 2:13:14 PM]

Share this post


Link to post
Share on other sites
I compiled the VB version of lesson 1''s source code. It compiles fine but when wglMakeCurrent gets executed my program crashes. I also tried running the exe that comes with the c++ code, and it crashes too.

c++ code: http://nehe.gamedev.net/data/lessons/vc/lesson01.zip
vb code: http://nehe.gamedev.net/data/lessons/vb/lesson01.zip

Share this post


Link to post
Share on other sites
By chance do you use a Voodoo3 3000? On my old computer, I would have this happen about 25% of the time, but only the first time it was called. The crash was completely random (and horrible).

My only suggestion is to call it with invalid parameters the at the very begining of your program. Possibly this will not lock up and all subsequent calls to it may work correctly assuming it will only crash the first time its called. good luck....

Share this post


Link to post
Share on other sites
Err... He is using a nVidia card. He said he downloaded the detonator drivers.

Edit: Just get Visual C++ and try to compile the code, if it doesn't work than it is your system. You can reinstall Windows, get a new video card, if it doesn't work than get a new computer, lol .

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

[edited by - shlomisteinberg on July 29, 2003 1:04:54 AM]

Share this post


Link to post
Share on other sites
I was able to get some info from Dr. Watson. Here it is:

----------------------------------------------------------------
Microsoft (R) Windows 2000 (TM) Version 5.00 DrWtsn32
Copyright (C) 1985-1999 Microsoft Corp. All rights reserved.



Application exception occurred:
App: (pid=928)
When: 7/27/2003 @ 21:29:47.706
Exception number: c0000005 (access violation)

*----> System Information <----*
Computer Name: BIC
User Name: Administrator
Number of Processors: 1
Processor Type: x86 Family 5 Model 8 Stepping 12
Windows 2000 Version: 5.0
Current Build: 2195
Service Pack: 3
Current Type: Uniprocessor Free
Registered Organization: Nocturnal Studios
Registered Owner: Art Lucas

*----> Task List <----*
0 Idle.exe
8 System.exe
164 smss.exe
188 csrss.exe
208 WINLOGON.exe
236 services.exe
248 LSASS.exe
504 svchost.exe
536 SPOOLSV.exe
568 svchost.exe
584 InoRpc.exe
624 InoRT.exe
648 InoTask.exe
732 nvsvc32.exe
756 svchost.exe
944 explorer.exe
1032 InCD.exe
1048 Realmon.exe
988 rundll32.exe
956 IEXPLORE.exe
352 WinRAR.exe
928 Lesson6.exe
948 drwtsn32.exe
0 _Total.exe

(00400000 - 0040E000)
(77F80000 - 77FFA000)
(10000000 - 10099000)
(51000000 - 51047000)
(78000000 - 78046000)
(77E80000 - 77F31000)
(77E10000 - 77E6F000)
(77F40000 - 77F79000)
(728A0000 - 728A6000)
(77DB0000 - 77E0B000)
(77D30000 - 77D9E000)
(77570000 - 775A0000)
(6FAC0000 - 6FADF000)
(72D90000 - 72E03000)
(00830000 - 0084D000)

State Dump for Thread Id 0x3fc

eax=00040000 ebx=100467ec ecx=00003812 edx=00000003 esi=00b32000 edi=00c32000
eip=1000783e esp=0012fc68 ebp=00000100 iopl=0 nv up ei pl nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000216


function: DllInitialize
1000781e 7664 jbe glMateriali+0x2c94 (1000fb84)
10007820 83f804 cmp eax,0x4
10007823 775f ja glMateriali+0x3494 (10010384)
10007825 8b4c2410 mov ecx,[esp+0x10] ss:00bad23b=????????
10007829 8b742418 mov esi,[esp+0x18] ss:00bad23b=????????
1000782d 0faf4c2414 imul ecx,[esp+0x14] ss:00bad23c=????????
10007832 8b7c241c mov edi,[esp+0x1c] ss:00bad23b=????????
10007836 c1e102 shl ecx,0x2
10007839 8bc1 mov eax,ecx
1000783b c1e902 shr ecx,0x2
FAULT ->1000783e f3a5 rep movsd ds:00b32000=???????? es:00c32000=00000000
10007840 8bc8 mov ecx,eax
10007842 83e103 and ecx,0x3
10007845 f3a4 rep movsb ds:00b32000=?? es:00c32000=00
10007847 5f pop edi
10007848 5e pop esi
10007849 c3 ret
1000784a 8b742410 mov esi,[esp+0x10] ss:00bad23b=????????
1000784e 33c9 xor ecx,ecx
10007850 0faf742414 imul esi,[esp+0x14] ss:00bad23c=????????
10007855 85f6 test esi,esi
10007857 7e2b jle glMateriali+0x3494 (10010384)

*----> Stack Back Trace <----*

FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
00000100 00000000 00000000 00000000 00000000 00000000 !DllInitialize

*----> Raw Stack Dump <----*
0012fc68 00 01 00 00 48 00 c0 00 - 80 7e 00 10 03 00 00 00 ....H....~......
0012fc78 00 01 00 00 00 01 00 00 - 48 00 b0 00 48 00 c0 00 ........H...H...
0012fc88 00 00 04 00 cc fd 12 00 - 00 01 00 00 00 01 00 00 ................
0012fc98 ec 67 04 10 e0 9a 13 00 - d8 49 15 00 5c fd 12 00 .g.......I..\...
0012fca8 d0 9e 13 00 88 96 13 00 - e0 9a 13 00 9c fc 12 00 ................
0012fcb8 10 fd 12 00 00 fd 12 00 - e2 8e 03 51 20 1d 00 51 ...........Q ..Q
0012fcc8 ff ff ff ff 03 e6 02 51 - 01 84 01 51 2d 84 01 51 .......Q...Q-..Q
0012fcd8 cc fd 12 00 00 01 00 00 - ec 67 04 10 20 48 15 00 .........g.. H..
0012fce8 00 00 00 00 d0 9e 13 00 - 88 96 13 00 e0 9a 13 00 ................
0012fcf8 d8 fc 12 00 02 00 00 00 - b0 ff 12 00 e2 8e 03 51 ...............Q
0012fd08 e0 13 00 51 ff ff ff ff - 2d 84 01 51 6f 85 01 51 ...Q....-..Qo..Q
0012fd18 e0 9a 13 00 64 fd 12 00 - 5c fd 12 00 00 00 00 00 ....d...\.......
0012fd28 a0 b2 00 10 d8 49 15 00 - 03 00 00 00 00 01 00 00 .....I..........
0012fd38 00 01 00 00 00 01 00 00 - 00 01 00 00 48 00 b0 00 ............H...
0012fd48 00 00 00 00 50 08 87 00 - e3 31 e3 77 01 00 00 00 ....P....1.w....
0012fd58 00 01 00 00 d8 49 15 00 - 03 00 00 00 7c 00 00 00 .....I......|...
0012fd68 07 10 10 00 00 01 00 00 - 00 01 00 00 00 00 00 00 ................
0012fd78 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
0012fd88 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
0012fd98 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................

----------------------------------------

EDIT: Did some poking around and found DllInitialize to be in opengl32.dll. Does this mean that OpenGL is fux0r3d on my pc? Does anyone know where I can get another version of opengl32.dll?

[edited by - MeNoThere on July 29, 2003 7:31:46 PM]

Share this post


Link to post
Share on other sites
No, I''m fairly sure it is OpenGL that is causing the crashes. I''ve tried quite a few of the precompiled binaries of the lessons at NeHe and they all crashed. As well as a few games that support OpenGL. I tried replacing the version that comes with Windows 2000 with the one you can download from Microsoft for Windows 95. It ran slow... very slow, but it ran. So, can someone send me their copy of OpenGL32.DLL? My email address is dae@nocturnalstudios.net

Share this post


Link to post
Share on other sites