Hacker News new | ask | show | jobs
by plicense 4105 days ago
I recently wrote a library that rasterizes a PDF page to an image and was observing a very similar behavior. It was also highly system dependent and erratic as well. I would randomly see a distorted image of my own screen when I run my program on any PDF. Then figured out I was not initializing the buffer I was using to render the PDF page to image. After I memset'ed it to zero, the problem went away. I still couldn't quite comprehend what was exactly happening in the background.
1 comments

Yes, this is the same way I found this - In the course of another project I had the same "Huh, this is weird" moment. Then I started experimenting with different setups (Linux, Windows, VMs) and was surprised that I apparently almost always succeeded in recovering stuff.