For the record, my generic battery is the Wasabi brand sold on Amazon that I know many Forum users have purchased and are happy with.
Amazon.com: Wasabi Power Battery for Pentax D-LI90 and Pentax 645D, K-01, K-3, K-5, K-5 II, K-5 IIs, K-7: Camera & Photo
It is only $15 compared to $40 or $50 for the Pentax OEM battery.
In a negative 1-star review, the customer stated:
"On first use the camera operating system crashed after shooting a few shots. I removed the battery, reinserted the Wasabi, turned the camera back on and everything was fine. Called Pentax customer service and they told me to consider sending the camera in for inspection if it happened again. Set the Wasabi aside and went back to the Pentax battery. The camera has not crashed since (about 7 months) with continuous use of the Pentax battery. Day before yesterday the Pentax battery was near empty so I decided to keep shooting with the Wasabi installed. After 10 exposures the operating system crashed. Need I say more. "
I don't know if I experienced the same thing as far as an OS crash but it does sound a little similar. Anyway, I will have to do more testing with both my Wasabi battery and the OEM one.