Direct observation of crises of the chaotic attractor in a nonlinear oscillator