WGL_ARB_render_texture crash

i use the newest drivers from nvidia’s homepage for xp/2k, i run 2k and i have a geforce2mx.
i downloaded the demo from nvidia (http://developer.nvidia.com/view.asp?IO=ogl_rtt) and it runs.
i have a lot of extensions and gl1.3.1 as you can see in my logfile: http://tyrannen.starcraft3d.net/logfile.html

i use, as nvidia does, the glh-headerfiles, namely glh/glh_extensions to initialise them.

as you can see, i can’t initialise all my extensions cause i dont have code for all of them, but the ones i need are there. no error for them (you see the checks for the needed extensions after the full list…)

i create a pbuffer with the code of the demo from nvidia and i get no errors, so it is valid (how to check if the pbuffer is ok btw? there are some query-funcs i think…)

i create my texture. and guess what? no errors

i have only one problem: when i try to bind my pbuffer or release it from the texture, i get a crash. no error, but a simple plain application crash:


NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung

Die Anweisung in “0x695ee9d0” verweist auf Speicher in “0x00000060”. Der Vorgang

“read” konnte nicht auf dem Speicher durchgeführt werden.

Klicken Sie auf “OK”, um das Programm zu beenden.
Klicken Sie auf “Abbrechen”, um das Programm zu debuggen.

OK Abbrechen

(its in german, but i think you know it )

if you want to try it yourself. here: http://tyrannen.starcraft3d.net/Release.zip

and these are my two functions:

bool RenderTarget::BeginPaint() {
glBindTexture(GL_TEXTURE_2D,m_textureID);
// NEXT LINE CRASHES
wglReleaseTexImageARB(m_hpbuffer,WGL_FRONT_LEFT_ARB);

wglMakeCurrent(m_hdc,m_hglrc);
return true;
}

bool RenderTarget::FinishPaint() {
Acc gl;
glFlush();
gl->MakeCurrent();
// THIS ONE CRASHES AS WELL
wglBindTexImageARB(m_hpbuffer,WGL_FRONT_LEFT_ARB);
return true;
}

now the big joke is. i can call these functions! if i call them with wglBindTexImageARB(0,0) this works well, at least, no crashes…

but there the crash occurs…

if you need the whole source to play around, i can send it… i’ve uploaded the RenderTarget.cpp as well: http://tyrannen.starcraft3d.net/RenderTarget.cpp

and yes, i removed lot of the errorchecking from nvidia and re-arranged most of it, but i primary used nvidias code and got the same problem, nothing changed so far…
i’m working on this now since about 8 hours and i’m really tired of this bug…

interesting, not?

NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung

Die Anweisung in “0x695ee9d0” verweist auf Speicher in “0x00000060”. Der Vorgang

“read” konnte nicht auf dem Speicher durchgeführt werden.

Klicken Sie auf “OK”, um das Programm zu beenden.
Klicken Sie auf “Abbrechen”, um das Programm zu debuggen.

OK Abbrechen

have you looked at the titlebar?

NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung
from where is the "NVOpenGLPbuffer: " ? thats not from me…

Rebuild all?

Crashes on my Radeon 8500 too.

kieranatwork:
rebuilded tons of times, doesn’t mather
humus:
well, doesn’t look like a driver bug then…

Could you send me the project? Then I’ll try it on my system.

i’m rewriting the whole code currently so no chance for a working compilation

but you can try the executable (should be still online…)

Didnt know that dave was german

ich bin schweizer…

ich bin schweizer
german speaking Switzerland ?

ich spreche deutsch
je parle francais
i speak english

natural language: schwizerdütsch (swiss german)

Nobody would have guessed that I’m german, but i really am!

Guten Tag!
Bonjour!
Hi! ( )

your name is STEINBERG… now come on… thats well known a german word at least… so why not a german person? (stone-mountain == steinberg)

Damn, I couldnt take the piss out of you!
(thats how my dictionary translates verarschen…

I prefer the translation Stonehill btw

Did you notice that you’re straying off the topic?

its my thread, so its my topic

you just did not helped yet very much thats annoying… people like you always in those forums grmbl!

I might have some good news for you Dave. I got the exact same error message ( though not in German ) and it was actually a crash elsewhere in my program. Strange that the crash was reported as “NVOpenGLPbuffer: …”. Try a debug build of your project and single step through it.

i got a good message, too… i just rewrote the whole code and now it works

Originally posted by davepermen:
i got a good message, too… i just rewrote the whole code and now it works

So, what was the mistake? Do you have any useful hints regarding what not to do?

yes:
don’t follow the papers/demos from nvidia

use the code from humus as a base

dunno where the bug was, but possibly wglShareLists was something helpful… not sure about all those context-managing etc… but humus approach works nice (nvidias, too, but not in my code )