- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get an access violation in my program in a part that was copied from the sample program Puzzle (...SamplesOpenGLPuzzle). It appears that the error also exist in the sample program. Is this error specific in my environment (CVF6.5A in Windows 95) or does this error happen for others too?
The error is normally not a problem, because the exception status for access violation is "stop if not handled", but apparently it is handled and it goes on without problem. But when you debug the program you see the access violation in the output window and when the exception is set to "stop always" it stops at a position where I do not see any problem.
Sometimes the program stops when calling SetDCPixelFormat in the Wndproc and sometimes it stops when performing a rotation via the key F1, F2 or F3.
My question is: do others experience the same error?
Though the program does not encounter further problems, I assume something is not set good. An access violation should not occur, handled or not handled.
Guus.
The error is normally not a problem, because the exception status for access violation is "stop if not handled", but apparently it is handled and it goes on without problem. But when you debug the program you see the access violation in the output window and when the exception is set to "stop always" it stops at a position where I do not see any problem.
Sometimes the program stops when calling SetDCPixelFormat in the Wndproc and sometimes it stops when performing a rotation via the key F1, F2 or F3.
My question is: do others experience the same error?
Though the program does not encounter further problems, I assume something is not set good. An access violation should not occur, handled or not handled.
Guus.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There may be a problem with the OpenGL implementation for Windows 95. I have run this example on Windows 95, 98, NT and 2000 and had no trouble. Do you see an error when this is not run in the debugger?
I have worked on this example a lot, and never saw an access violation.
Steve
I have worked on this example a lot, and never saw an access violation.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see an error when I run the sample in the release mode. It is only visible in debug mode as well in the sample program (in ..SamplesAdvancedOpenGLPuzzle) as in my own program.
I just try it again and I found, that the access violation only occurs when running the program via "Start debug" and "Go" and only after pressing F2 several (6) times. It does not appear when executing the debug version of puzzle.exe directly.
I just try it again and I found, that the access violation only occurs when running the program via "Start debug" and "Go" and only after pressing F2 several (6) times. It does not appear when executing the debug version of puzzle.exe directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce this on my Windows 2000 system.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might read the Microsoft Knowledge Base article Q240896, OpenGL Program May Cause an Invalid Page Fault Error Message if the Window Is Moved or Resized (click here to view Q240896).
Mike
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I recognize this problem. The access violation is an array out of bounds.
You can force it to happen if you compile with a check for array out of bounds and run it after going to your control panel and changing the settings on your
display to a color palette of 256 colors. The routine does a malloc to allocate the storage for the array(palettte%palPalEntry), but it is declared with only 1 element.
You can force it to happen if you compile with a check for array out of bounds and run it after going to your control panel and changing the settings on your
display to a color palette of 256 colors. The routine does a malloc to allocate the storage for the array(palettte%palPalEntry), but it is declared with only 1 element.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see what you mean, but in my case the flag PFD_NEED_PALETTE is not set and so the code for the palette structure is skipped.
This time the error occurs in the routine SetPixelFormat, but in the Puzzle-example it also happens on other points in the program.
Guus
This time the error occurs in the routine SetPixelFormat, but in the Puzzle-example it also happens on other points in the program.
Guus

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page