This is in Windows 10. I'm trying to save a 10000x5000 pixel image as a JPEG. I can save it in literally any format I want without problems, but as soon as I try to save it as a JPEG, almost every time I get the error "Could not save a copy as "somefilename.jpg" because there is not enough memory (RAM)."
Anything above 10 megapixel starts to have this error intermittently. Above 15 megapixel and it gives the error a majority of the time. The other issue is that I was able to get it to save a 10 megapixel file to JPEG format, but the JPEG is corrupted. I tested this multiple times and it gets the same result. The contents of the corrupted file are different every time. Usually, a JPEG file has a header with the text "JFIF" in the first few bytes, but the corrupted files do not have this header. One actually had "EXIF" near the header instead. Perhaps it's corrupting during the saving of EXIF data? I suspect it's a photoshop bug and not a system issue.
I've rebooted, reset cache, reset preferences, deleted temp files, etc etc. and I still get the error, especially on multi-layered files (flattening before saving doesn't help). I've been able to use previous versions of Photoshop on 2+ gigabyte files without issues. This is all a new problem.
My system has a 1tb main drive with 500gb free, 1tb solid state scratch disk and 32gb of RAM. Photoshop is set to use 24gb of memory. Previous Photoshop versions never had this problem.
Bug, Import and export, Performance, Problem or error, Windows
Adding an update: This error also occurs any time I try to copy graphics from a layer. It says Photoshop doesn't have enough RAM to copy to clipboard, even if I'm only copying a 1000x1000 pixel area. At this point, Photoshop 2021 is useless in this state.