FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OpenGL *f functions crash

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
randomZ



Joined: 04 Dec 2004
Posts: 31
Location: Tuebingen, Germany

PostPosted: Sat Feb 12, 2005 8:42 am    Post subject: OpenGL *f functions crash Reply with quote

Hi,

the OpenGL functions that end with f (i.e. expect float arguments) crash on my machine, while the double ones (*d) work. E.g. glColor4f() crashes, while glColor4d() works. Does anyone have similar problems? Could this be a data type problem between D and C?

Sebastian
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Feb 12, 2005 10:37 am    Post subject: Reply with quote

Thanks for pointing this out, but... it appears to be only one function and not all of the *f functions. I started testing the *3f stuff, then moved to the *4f functions. The only problem I found was, as you mentioned, glColor4f. And the problem turned out to be that it wasn't being loaded. You were calling a null function pointer, hence the crash (access violation). Did you have problems with any of the other functions? A cursory glance of gl.d looks okay, but my sight is a little blurry right now so I want to be sure I didn't miss anything Smile

Please in the future, when reporting bugs, report exactly what you did to cause the crash and any output that results. There are many ways a program can crash. Knowing that an Access Violation was going on would have indicated a null pointer as the likely culprit, and would have (in this case) helped me to zero in on it a bit faster. Though this one really was an easy one to find since I have a SDL/OpenGL framework set up for testing/bug catching Smile

Anyway, the fix is in svn and glColor4f works now.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sat Feb 12, 2005 2:08 pm    Post subject: Reply with quote

Good that you caught that, Mike.

How does a null function slip by the error test in the getProc function? That's strange!

- John R.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Feb 12, 2005 7:52 pm    Post subject: Reply with quote

The load function was never calling getProc for glColor4f is what the problem was. I'm hoping there's nothing else I left out.
Back to top
View user's profile Send private message Send e-mail
randomZ



Joined: 04 Dec 2004
Posts: 31
Location: Tuebingen, Germany

PostPosted: Fri Feb 18, 2005 3:55 pm    Post subject: Reply with quote

aldacron wrote:
Thanks for pointing this out, but... it appears to be only one function and not all of the *f functions. I started testing the *3f stuff, then moved to the *4f functions. The only problem I found was, as you mentioned, glColor4f. And the problem turned out to be that it wasn't being loaded. You were calling a null function pointer, hence the crash (access violation). Did you have problems with any of the other functions? A cursory glance of gl.d looks okay, but my sight is a little blurry right now so I want to be sure I didn't miss anything Smile

Please in the future, when reporting bugs, report exactly what you did to cause the crash and any output that results. There are many ways a program can crash. Knowing that an Access Violation was going on would have indicated a null pointer as the likely culprit, and would have (in this case) helped me to zero in on it a bit faster. Though this one really was an easy one to find since I have a SDL/OpenGL framework set up for testing/bug catching Smile

Anyway, the fix is in svn and glColor4f works now.


Heh yeah, I'm sorry. I just had a bunch of GL code that crashed and didn't remember the function that did it. I was really really tired. I'll do a proper bug report next time ^^

-Sebastian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group