I have for a long time used a piece of code that snaps a screen shot of the current game screen, applies some effects, and uses said image as the backdrop in a full screen pause menu.
I have not changed this code.
Just recently the code started to give me a series of errors. I isolated the issue to this line:
Get Image 100, 0,0, 1920, 1080, 1
Everything ahead of this executes. This is the first thing, just a screen grab, before any fancy effects. The Screen Height() and Screen Width() report 1920x1080x32 resolution.
Sometimes the error doesn't occur and instead
Get Image returns no image, and the program later crashes when the game tries to delete the image that doesn't exist.
If I change the
Get Image size to a much smaller area it begins to work 100% as intended.
If I add this ahead of
Get Image then it magically works again 100% of the time:
While ReturnKey() = 0
SYNC
EndWhile
However adding a small series of SYNC commands in front has no effect.
It's as if a bunch of unrelated things is affecting the behavior, and literally the code has worked 100% in the past.
The only thing I can think of is I recently updated the Video driver before this sort of stuff started happening. I updated again to the latest nVidia beta drivers, hoping it would fix the issue. Nope.
I am also noticing I am having problems now loading images at 1920x1080 in png format. Sometimes they give an error "Unkown Error Loading Image". I switched to DDS format and it seemed to go away.
Specs are:
Windows 8
AMD64 (6 Cores)
16gb Ram
SLIx2 nVidia GTX460 768mb
SATA3 HD
Game Specs:
1920x1080x32
Camera is set to 0
Sync Rate 0
Sync On
Camera is Sync'd
Thanks for any suggestions.
EDIT: I'll also add the error does not occur at all running on a separate laptop. It is running at a lower resolution (1600x900) using the same compiled game executable. Dropping the resolution on the workstation does NOT solve the problem.