Ok… I’m having a bit of a problem with glut (and Borland c++ builder 5.0). For some reason, it will run just fine, and then when recompiling, it will just crash with the error “Project Project2.exe raised exception class EAccessViolation with message ‘Access violation at address 1000BBAE. Read of address FFFFFFFF’. Process stopped. Use Step or Run to continue.”, and the line it shows having caused the error isn’t one that i changed, in any way since the previous compile.
If i comment out that line, then the next one causes the same error, and so on. So, if i comment out the line before all of this, it causes an error at a completely different section of code, although it is still the same error (with a different address in the “Access violation at address 1000BBAE” part).
There is an image online at http://www.dollsap.com/derivative/error.gif of what the error screen looks like, including the error message, and the line of code that it finds the error at.
If anyone can help me on this matter, i’d be really really appreciative.
Ok, a few things that i should have said, as well.
Firstly, the code is nearly an exact copy & paste of some demo code i got for a library that uses glut. The only parts that have changed are not in the main function.
Secondly, I didn’t even realize that it didn’t have the glutInit() function is part of it. However, having just tried putting that in there, it didn’t solve the problem. it still crashes at the same point.
Also, all the functions for the glutResizeFunc() and so on, afaik, if they didn’t take the proper parameters, i should get a compile time error - i think.
and I’m using the straight font.tga that Nate provides with his source. Couldn’t imagine that would be the problem though.
You could try running a debugger through the code and have a look at the call stack when it crahses to see what went wrong. It may be a graphics card issue.
Yeah, and the differences in headers is just from where i’m putting mine. Hrm…
And as i did say, its compiled just fine for me before, too. Just for whatever reason, it decided to start giving me that error. I’ll try the debugger thing, though. see where that gets me…