Originally posted by Adam Good that you mentioned this, because it's almost certainly the cause of the issue. When your battery voltage is low, the camera can behave unpredictably. Unfortunately, Pentax hasn't perfected the way it powers the camera through the grip, so your camera can crash or simply die if either the batteries in the grip or in the body are very low.
It's hard for any camera to correctly indicate the amount of charge remaining in a set of battery, especially when battery to grip contacts are spoiled by fingers. When contacts are not clean, the DC voltage is still Ok with no load current (so the camera is still powered correctly) but when in operation the voltage temporarily drops below min level. From design standpoint, Pentax could have increased the size of decoupling power supply cap (or add an extra decoupling cap inside the grip, at the expense of size) or use faster DC-DC converter (if there is one...). But often, cleaning battery contacts with degreaser helps a lot to get the most out of batteries.