If you are using C, then these issues should not be a problem.... Uninitialized W reg flag or an unrecognised instruction will not ever be a problem in C unless you are selecting the wrong device.... If you compile for a slightly different chip than the one you are simulating, then this will happen..
It would take some rubbish programming to use up the entire stack... I have also noticed that some of the new micro learners cannot distinguish between a hardware stack and a software stack!!! You need to read up!!