One of the problems of the numerical integrations of cometary orbits is that of their numerical stability. For those bodies which undergo close encounters with the giant planets the problem has a specific feature. Apart from the numerical instability of integrations in the mathematical sense, there is an additional source of instability due to the inaccuracy of initial data, i.e. the orbital elements. An example of this case is presented in this paper by the numerical integration of the motion of comet P/Shajn-Schaldach over an interval of 368.4 years, within which six close encounters with Jupiter occurred. The inaccuracy of the starting orbital elements of this comet is modelled by changes in the last digit of each element of the central orbit, determined by the set of the best orbital elements. In the process of integration, eight model orbits experience differential perturbations with respect to the central orbit. The numerical instability, caused by the inaccuracy of starting orbital elements and represented by the dispersion of these orbits, tends to increase abruptly beyond each encounter with Jupiter. It is shown that, with the attainable accuracy of the osculating elements representing the observations, one or two approaches to within 1 AU from Jupiter can make the orbit entirely indeterminate.