Somehow, my pig keeps escaping its pen, a feat the cows and the sheep has failed to manage. So I have to herd the stupid thing back in there. Is it glitching through the fences or something?
I had a similar problem and found out that it was that certain objects won't stop animals. In my case it was that I used food troughs as part of the wall and apparently animals can materialize through those.