Welcome to the forum!
There was a batch of K-50s and K-30s with that problem, but there are a batch of them that didn't experience that problem too. I'm still using my K-50 I bought almost two years ago and have had no such problems with it. I don't let it sit idle for months at a time though and from reading the problems others have had, that was one of the reasons it happened. Course there was also the serial number too. If it was a certain serial number, don't remember which now one that was, you wouldn't experience the ABF either. Perhaps my K-50 was in that batch. I keep my fingers crossed that's it.
I had a K-30 that had the problem, so I got the AA adapter and started using it, people tell me that's a temporary fix, but it's been working that way for two years now, first for me, and now for my daughter, when I gave her that camera.
I started out in Pentax with a K1000. Used film up until I joined here, and a year later bought my first digital, a K100D, then a K-x, then a K-30, then the K-50, another K-30 and now also own a K-5.
Never had any other problems with the others, except the K-30 as I explained above.