Ever since the Android 9 (Pie) update, I have experienced frequent crashes of apps that attempt to access, create, download, etc. any media files. When I access google photos, I will see a bunch of grey squares where my photos should be, and during such times, when I attempt to download any image or access files in another app (the chrome browser or a chat app such as discord, for example), that app will freeze and crash. If I attempt to take a screenshot at this time, I will get an error claiming it failed. The closest thing to a "fix" I have found is to force stop and clear cache from every single app which could possibly be accessing media files at the moment, but even then, that fails more often than not and I have to keep doing it until I can access photos again. At that point, any image which was downloaded or created while everything was crashing will be in my photos library as if nothing had happened, and other apps will be able to download, upload, or create images and media just fine. However, this will only last for a while, and eventually my phone will return to being unable to access media properly and crashing things that attempt to.
There is no known trigger for this problem. The problem began began immediately upon updating to Android 9. I have no idea if anyone else is having this issue and I have no idea how to fix it. If I can't find a permanent fix within the next few days, I will attempt a factory reset, but I consider this a last resort and would much prefer any other sort of fix due to the sheer hassle of backing up everything and setting my device up all over again in hopes that it works.