August 16, 2019
SD card unavailable
I have a Sony Xperia XZ Premium phone that I love, except the camera app likes to give me memory errors ("SD card unavailable") when starting the app. At first I thought my SD card had gone bad, so I bought a new one, and still got the same error. Hmm, maybe the SD card interface had gone bad, so I switched to the internal memory, same error.
After some fiddling I discovered that if the camera app had not been opened in a while, the memory interface probably goes into stand-by mode, and when the camera app starts up it couldn't load the last image from the gallery and times out. The effect is that every time I pick up my phone in a hurry to take a photo, I get this error, but if I'm constantly using the camera, then no problems. Thinking back I realized the problem started occurring shortly after a software update, so it must be a software bug. I can easily reproduce the bug if I let the phone/camera app idle for a long time, or do something CPU intensive such as installing an app from Google Play while opening the camera app at the same time.
Strangely enough, the problem doesn't seem to affect all people, since a web search reveals a lot of people reporting about this issue, but even more people replying that they have no problems and it must be an SD card issue or some other software conflict. The problem seems to be widespread since it happens with all phones, even the Xperia 1. I myself have another Sony phone (XA2 Ultra) that started having the exact same problem after a recent software update.
To workaround the problem I finally decided to use a third-party camera app. Unfortunately I can't seem to find one that works as well as the built-in camera app, they all suffer from over complexity or annoying UI issues (either a case of the developers don't eat their own dog food, or the developers forcing dog food down users' throats). After a lot of searching and trying, I finally settled on Footej Camera. It's simple and fast and doesn't have a lot of UI annoyances, and obviously doesn't give me SD card errors.
Update: Unfortunately even though Footej doesn't have startup SD card errors, it seems to have the same time-out issue from time to time and ends up losing the current photo. I'm going with Cameringo+ for now. Cameringo+ seems to be stable, but it forces full-screen immersive mode which is really annoying since it doesn't let me exit the app easily. The app has an option to toggle immersive mode which does absolutely nothing.