Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Program.exe has stopped working.... error

  1. #1
    Intern Contributor
    Join Date
    Dec 2016
    Location
    Ocean Shores, WA USA
    Posts
    66

    Question Program.exe has stopped working.... error

    Hey all,

    I've added one line to a working opengl program, here it is:

    Code :
    glGenVertexArrays(1, &pVAO);

    then I compile and run the program, and it stops with the error in the subject line:

    <program.exe> has stopped working.....

    Am I missing something?

    I already use a sprite class in this program successfully to call this and other functions upon instantiation of sprite classes, that I use to manage my basic little sprite engine that I've got going. ..... so why does this happen, when I'm just trying to add one function call?

    I know this is the problem, because I commented out all the other code that I added to the program, AND, as soon as I comment out this one line, the program works fine.

    Anybody have any clue why this is the case?

    I'm going to wrack my brain on this for a while, until I figure it out, but any help is appreciated.

    I have a youtube channel that I make tutorials for opengl, and this was going to be my next video.....!

    Alright, thanks,

    Jeff

  2. #2
    Intern Contributor
    Join Date
    Dec 2016
    Location
    Ocean Shores, WA USA
    Posts
    66
    NVM, this is just a glitch, I moved the code down further in the same main() function, and it works fine.......

    Gotta love Microsoft Visual Studio 2017 (it just updated yesterday too, 5GB worth....).

    Jeff

  3. #3
    Intern Contributor
    Join Date
    Dec 2016
    Location
    Ocean Shores, WA USA
    Posts
    66
    I posted the video that I was working on, on my youtube channel (yet another shameless plug). See link below.

    https://www.youtube.com/channel/UCzx..._as=subscriber

    Gnite all, I'm also about to post another fireworks update if anyone is interested.

    Jeff

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,716
    Quote Originally Posted by OceanJeff40 View Post
    Am I missing something?
    You're missing using your debugger.

    If you had built and run a debug build (and Visual Studio, which I see you're using, has an excellent debugger) you wouldn't have seen a crash. Instead you would have seen execution stop at the glGenVertexArrays call, you would have been able to inspect the function pointer for glGenVertexArrays, seen that it was NULL, and then known that you were calling glGenVertexArrays too early - probably before creating your GL context or before calling glewInit (if using GLEW).

  5. #5
    Intern Contributor
    Join Date
    Dec 2016
    Location
    Ocean Shores, WA USA
    Posts
    66
    Nice, thank you. I'll have to re-create the error, and try that.

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •