Originally posted by olsinglefin Every once in a while a black rectangle outline will flash on the viewfinder.
Unreliable contacts with either of the hardware interfaces (lens mount contacts, battery contacts, battery grip contacts, SD card contacts, etc. or electrical contacts between components inside the camera) can confuse the firmware leading to unstable operation. It's not difficult to check and carefully cleanup every contact that is accessible without opening the camera. But if external checks don't solve the problem, I'm afraid that any internal hardware issue requires to send the camera for repair to a qualified Pentax repair center.
Do you have the same issue with another lens? Have you checked the lens mount on camera side and lens side? The mount can be cleaned on both side to make sure the lens electrical contact are reliable.