The effect of resonance crossing on beam stability is studied systematically by employing a novel tabletop experimental tool and a multiparticle simulation code. A large number of ions are confined in a compact linear Paul trap to reproduce the collective beam behavior. We can prove that the ion plasma in the trap is physically equivalent to a charged-particle beam propagating through a strong focusing channel. The plasma confinement force is quickly ramped such that the trap operating point traverses linear and nonlinear resonance stop bands. Assuming a nonscaling fixed field alternating gradient accelerator composed of many identical FODO cells, we measure how much ion losses occur under diverse conditions. It is experimentally and numerically demonstrated that too slow resonance crossing leads to significant ion losses as expected. Particular attention must be paid to the linear coherent resonance excited at a quarter-integer tune. When the beam intensity is high, this type of linear stop band can seriously affect the beam quality even for rather fast resonance crossing. A scaling law is given of the emittance growth caused by the quarter-integer resonance crossing.