If you experience an issue in which Aperture quits unexpectedly while applying ratings or keywords to images, then it may help to rebuild your Aperture Library. To do so:
Quit Aperture.
While holding the Command and Option keys down, open Aperture.
When the Rebuild Library dialog appears, click Rebuild Now.