Why bones IK change positions by itself? I am done with the rigging on my mesh with bones parented with empty groups. But, when I start creating the keyframes in the animation. the bones position change very oddly by themselves. 

This is the keyframes I have created


And this is how appears automatically in the animation


After this I have to apply Alt+G+R "TWICE" to reset them.

Does anybody knows why and how to solve this?

Thanks in advance
When an IK chain change position in weird ways, it's because of one of this problems:


the ik traget location is modified by the movements of one bone of the chain itself: so there is an endless circularity. Check if it has constraints related to any bone of the chain, or if it is child of a bone related to the chain.
some bends have a flipped position that can resolve the IK request, so you need to establish a pole target to have full control of the behaviour of the chain