Jump to content
  • Advertisement
Sign in to follow this  
the_regular1

Problem Plotting Pixels

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://rafb.net/paste/results/G51FNA27.html Above is the site with my code. My problem is that when I run the program, everthing seems to be in order; the pixel gets plotted, and it doesn't freeze up. But when I close the app, one of those microsoft "An error occured in Text.exe and needs to close" errors. When I run the debugger, the only bad line is line 128 video_buffer[x+y*mempitch] = color; statement. The debugger releases these two errors concerning that line: "Unhandled exception in Test.exe: 0xC0000005: Access Violation." and when I look at the variable properties of *video_buffer, it says "expression cannot be evaluated". Could someone help me? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I couldn't spot why, but my best guess is that the video memory access is performed after the application has been deinitialized. This might be due to an additional message coming in after WM_QUIT. This can be prevented by including a guard which specifies if the application is active, and subsequently only render when it is and setting it to non-active on WM_QUIT.

Greetz,

Illco

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!