Sample Header Ad - 728x90

Why are my PNG files becoming corrupt so frequently?

0 votes
1 answer
585 views
I use R/RStudio to draw graphics and maps, and save them as PNG. Along the creation process, I save the same file over and over, to see how it's going, until I get to the final product. Sometimes the file is fine, I send it to someone or upload somewhere, just to find out later (minutes, hours, days...) that the files are not correct anymore (the uploaded version is ok). Sometimes they become blank, other times they become one of the previous versions. The example below happened just now. I had to make the map in R again. The final product: perfect PNG and the version to which it reversed just in front of my eyes (I saw the icon on Nautilus loading again) corrupt PNG Both files have the exact same size in bytes. cmd shows 355,715 different bytes. A previous corruption in other file was much smaller (dozens of different bytes), but the image became blank, though both files also had the same size in bytes. This used to happen in my previous Debian (10) and happens in the current too (11). Also happened with the previous SSD (120 GB) and with the new one (240 GB, both Kingston). Sometimes the files are stored in the SSD, sometimes in a HDD. I'm searching for thinks like Debian PNG corrupt files, but haven't found anything. There was no power shortage that I noticed. The frequency of this error is too high to be ignored. And PNG's are the only file I noticed getting corrupt, except for a single ODT (where hours of changes had their track lost). Do I have a virus? What's going on? EDIT I've filed an issue [here](https://github.com/rstudio/rstudio/issues/11798) .
Asked by Rodrigo (1894 rep)
Aug 18, 2022, 10:07 PM
Last activity: Aug 19, 2022, 05:21 PM