Carrying on a series of posts in which I try to fix a problem before it drives me mad...
More DibGraphics crashes. The current thinking has it that when we run out of memory, then attempt a memory-intensive operation such as a double-buffered paint, we crash.
This one is totally reproducible.
Step 1: Turn off your pagefile. Set this to "No paging file".
Step 2: Eat memory like a fat man at an all-you-can-eat buffet.
Step 3: Paint a double-buffered dialog.
And bang! You get a crash. Probably a System.ComponentModel.Win32Exception, either "The operation completed successfully" or "Not enough storage is available to process this command".
Obviously there are two ways around this. Don't run out of memory, or don't double buffer. Although, if you're out of memory you're gonna go down hard at some point, whether it's the double buffer that kills you or something else. The question I have is, can we fail more gracefully?