OpAmp comparator circuit having unexpected behavior
Your system is unstable because you have a pole in the right half plane, and the result is that the output grows unbounded.

Any non-ideal op-amp has a finite DC gain \$\ A_0 \$ and a finite bandwith (crossover frequency \$\ \omega_c\$ below infinity) such a non ideal op-amp can be approximated as a single pole low pass filter, with the following transfer function;

$$ G(s)=\frac{A_0}{1+\frac{s}{\omega_c}}$$

Any non-ideal op-amp also has a finite input impedance \$\ Z_{in}\$, which can be approximated by a parallel RC circuit;

$$ Z_{in}=\frac{1}{C_{in}\cdot s+\frac{1}{R_{in}}} $$

Where \$\ C_{in} \$ is the input capacitance, and \$\ R_{in} \$ is the input resistance of your op-amp. Your feedback path is not just a capacitor, but a voltage divider consisting of \$\ C_1\$, \$\ C_{in}\$ and \$\ R_{in}\$. This means that the feedback transfer function of your circuit is;

$$ H(s)=\frac{C_{1}s}{(C_{1}+C_{in})s+\frac{1}{R_{in}}} $$

And the input transfer function is;

$$ I(s)=\frac{-1}{(C_{1}+C_{in})\cdot s+\frac{1}{R_{in}}} $$

Now let's combine it all to get the closed loop transfer function of the system;

$$ T(s)=I(s)\frac{G(s)}{1+H(s)G(s)}=\frac{-1}{(C_{1}+C_{in})\cdot s+\frac{1}{R_{in}}}\frac{\frac{A_0}{1+\frac{s}{\omega_c}}}{1+\frac{C_{1}s}{(C_{1}+C_{in})s+\frac{1}{R_{in}}}\frac{A_0}{1+\frac{s}{\omega_c}}}=\frac{-A_0}{\frac{(C_{in}+C_{1})}{\omega_c}s^2+((1+A_0)C_{1}+C_{in}+\frac{1}{R_{in}\omega_c})s+\frac{1}{R_{in}}} $$

Solving for the poles of the closed loop transfer function you will find that at least one situation where you have a pole in the right half plane (your system is unstable) is if;

$$0&lt;4\cdot \frac{(C_{in}+C_{1})}{\omega_c R_{in}}&lt;((1+A_0)C_{1}+C_{in}+\frac{1}{R_{in}\omega_c})^2&lt;1$$

(Which will be true at least as long as \$\ 0&lt;C_1&lt;&lt;1\$, \$\ 0&lt;C_{in}&lt;&lt;1\$, \$\ R_{in}&gt;&gt;1\$, \$\ A_{0}&gt;&gt;1\$ and \$\ \omega_{c}&gt;1\$)

This is easy to prove using simple (but painstaking) algebra, so I want bother with it here..

To sum it up; Your system is unstable because you have a pole in the right half plane.

The most simple solution would be to add a resistor in parallel with \$\ C_1\$ which is sufficiently small to make the system stable, while being sufficiently large to not cause an unacceptable error in your system. In general in order to be able to rely on the assumptions/simplifications we use when we design op-amp circuit, such as your integrator circuit, one of the things we require is that \$\ Z_{feedback}&lt;&lt;Z_{in}\$ which is not true for your circuit.